]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdkfd: Fix pqm_destroy_queue race with GPU reset
authorPhilip Yang <Philip.Yang@amd.com>
Thu, 20 Feb 2025 21:02:13 +0000 (16:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Feb 2025 21:50:05 +0000 (16:50 -0500)
If GPU in reset, destroy_queue return -EIO, pqm_destroy_queue should
delete the queue from process_queue_list and free the resource.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

index 93647ee27325b06ce6aecf48cbbb1bf1a24bfd36..662c595ce7838fea419702e0ff50ec81e9a74644 100644 (file)
@@ -548,7 +548,7 @@ int pqm_destroy_queue(struct process_queue_manager *pqm, unsigned int qid)
                        pr_err("Pasid 0x%x destroy queue %d failed, ret %d\n",
                                pdd->pasid,
                                pqn->q->properties.queue_id, retval);
-                       if (retval != -ETIME)
+                       if (retval != -ETIME && retval != -EIO)
                                goto err_destroy_queue;
                }
                kfd_procfs_del_queue(pqn->q);