Commit 2ce75a0b authored by Philip Yang's avatar Philip Yang Committed by Alex Deucher
Browse files

drm/amdkfd: Unreserve bo if queue update failed



Error handling path should unreserve bo then return failed.

Fixes: 305cd109 ("drm/amdkfd: Validate user queue update")
Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
Reviewed-by: default avatarAlex Sierra <alex.sierra@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c24afed7)
parent becbab4a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
		}