Skip to content

Commit

Permalink
drm/radeon: do not leave queue acquired if timeout happens in kgd_hqd…
Browse files Browse the repository at this point in the history
…_destroy()

If timeout happens, kgd_hqd_destroy() just returns -ETIME leaving queue
acquired.
It may cause a deadlock, so the patch proposes to release queue before return.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
  • Loading branch information
Alexey Khoroshilov authored and Oded Gabbay committed Jan 3, 2015
1 parent 030e416 commit 4c18442
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/radeon/radeon_kfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, uint32_t reset_type,
if (timeout == 0) {
pr_err("kfd: cp queue preemption time out (%dms)\n",
temp);
release_queue(kgd);
return -ETIME;
}
msleep(20);
Expand Down

0 comments on commit 4c18442

Please sign in to comment.