diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2015-01-03 18:31:20 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-03 18:31:20 -0500 |
commit | 4c18442e536ec24cc5ca23c5bbaa80bd53020b95 (patch) | |
tree | c942776401f270bbebc58f8c0a009d869af61413 | |
parent | 030e416b4f7782b22e8985095be0ea641aa20bf8 (diff) |
drm/radeon: do not leave queue acquired if timeout happens in kgd_hqd_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>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kfd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index 12c43df3d47d..a55afbadc65f 100644 --- a/drivers/gpu/drm/radeon/radeon_kfd.c +++ b/drivers/gpu/drm/radeon/radeon_kfd.c | |||
@@ -568,6 +568,7 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, uint32_t reset_type, | |||
568 | if (timeout == 0) { | 568 | if (timeout == 0) { |
569 | pr_err("kfd: cp queue preemption time out (%dms)\n", | 569 | pr_err("kfd: cp queue preemption time out (%dms)\n", |
570 | temp); | 570 | temp); |
571 | release_queue(kgd); | ||
571 | return -ETIME; | 572 | return -ETIME; |
572 | } | 573 | } |
573 | msleep(20); | 574 | msleep(20); |