]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdkfd: Unreserve bo if queue update failed
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 9 Dec 2025 20:13:23 +0000 (15:13 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Mar 2026 17:58:07 +0000 (13:58 -0400)
Error handling path should unreserve bo then return failed.

Fixes: 305cd109b761 ("drm/amdkfd: Validate user queue update")
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

index 586d409ebe4e95743264c907b8d69af03a30037f..cc2621ae12f9c6ae2bf2bc57bdc0dcb0695493ad 100644 (file)
@@ -593,6 +593,7 @@ int pqm_update_queue_properties(struct process_queue_manager *pqm,
                                         p->queue_size)) {
                        pr_debug("ring buf 0x%llx size 0x%llx not mapped on GPU\n",
                                 p->queue_address, p->queue_size);
+                       amdgpu_bo_unreserve(vm->root.bo);
                        return -EFAULT;
                }