]> 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 18:02:45 +0000 (14:02 -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>
(cherry picked from commit c24afed7de9ecce341825d8ab55a43a254348b33)

drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

index 8ea31699d38ba74771d663fad2e544dff4638065..f5d2847e1cbb44de5c898477beb56326f15ca795 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;
                }