drm/amdkfd: fix a memory leak issue
authorDennis Li <Dennis.Li@amd.com>
Wed, 2 Sep 2020 09:11:09 +0000 (17:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 15:36:24 +0000 (17:36 +0200)
commit8f85ebcc0e9d612a801b3b56e3af291aff36146f
tree4efe0e6ec9e1433ad6b60d6dc81397400c7a213b
parent3f9f1a29290ca2daa60c8f84e2afc1c4e4b86a9e
drm/amdkfd: fix a memory leak issue

[ 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>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c