diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-29 06:37:09 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-29 06:37:09 +0000 |
commit | 9bc1c005fee9491c96f1d9299eb2a60fe73b47d9 (patch) | |
tree | 57c9a64471d51a1dc0ae1c4f53d9febef925ccbc /sys/dev | |
parent | 83103109971e28db3ee3e2f5cdb2e45099d5a1b8 (diff) |
drm/amdkfd: Fix memory leak in create_process failure
From Felix Kuehling
aa02d43367a9adf8c85fb382fea4171fb266c8d0 in linux-6.6.y/6.6.29
18921b205012568b45760753ad3146ddb9e2d4e2 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/amdkfd/kfd_process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_process.c b/sys/dev/pci/drm/amd/amdkfd/kfd_process.c index fbf053001af..7a1a574106f 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_process.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_process.c @@ -818,9 +818,9 @@ struct kfd_process *kfd_create_process(struct task_struct *thread) mutex_lock(&kfd_processes_mutex); if (kfd_is_locked()) { - mutex_unlock(&kfd_processes_mutex); pr_debug("KFD is locked! Cannot create process"); - return ERR_PTR(-EINVAL); + process = ERR_PTR(-EINVAL); + goto out; } /* A prior open of /dev/kfd could have already created the process. */ |