]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/amdkfd: fix a memory leak issue
authorDennis Li <Dennis.Li@amd.com>
Wed, 2 Sep 2020 09:11:09 +0000 (17:11 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:47:58 +0000 (14:47 +0100)
commit7643ce094421fbd8352e5c154e910ade8bc93a11
tree097f6ea0790a5a3cc01e2b821a30a32a699f1f44
parent04a9a94f82d24824f3acd6635738abd53ab8f1ef
drm/amdkfd: fix a memory leak issue

BugLink: https://bugs.launchpad.net/bugs/1900624
[ Upstream commit 087d764159996ae378b08c0fdd557537adfd6899 ]

In the resume stage of GPU recovery, start_cpsch will call pm_init
which set pm->allocated as false, cause the next pm_release_ib has
no chance to release ib memory.

Add pm_release_ib in stop_cpsch which will be called in the suspend
stage of GPU recovery.

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Dennis Li <Dennis.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c