From: jsg Date: Fri, 7 Apr 2023 03:52:40 +0000 (+0000) Subject: drm/amdkfd: fix a potential double free in pqm_create_queue X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d9a4830802897b1c2ad56ce5f35536c57547d87a;p=openbsd drm/amdkfd: fix a potential double free in pqm_create_queue From Chia-I Wu b861f0e62ae148eb5f0a48c4d6fcd5dc03b4e252 in linux-6.1.y/6.1.23 b2ca5c5d416b4e72d1e9d0293fc720e2d525fd42 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c b/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c index 5137476ec18..4236539d9f9 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c @@ -218,8 +218,8 @@ static int init_user_queue(struct process_queue_manager *pqm, return 0; cleanup: - if (dev->shared_resources.enable_mes) - uninit_queue(*q); + uninit_queue(*q); + *q = NULL; return retval; }