drm/amdkfd: fix a potential double free in pqm_create_queue
authorChia-I Wu <olvaffe@gmail.com>
Wed, 8 Mar 2023 00:19:02 +0000 (16:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:39 +0000 (12:10 +0200)
commitb861f0e62ae148eb5f0a48c4d6fcd5dc03b4e252
treeaf30d0a457377170adf7ae26a02592abe40fedfe
parentb61b21bcbb8a379269de7d2e3e9ceb42e5368ec4
drm/amdkfd: fix a potential double free in pqm_create_queue

[ Upstream commit b2ca5c5d416b4e72d1e9d0293fc720e2d525fd42 ]

Set *q to NULL on errors, otherwise pqm_create_queue would free it
again.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@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_process_queue_manager.c