mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@amd.com>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org
Subject: Re: [PATCH] drm/radeon: do not left queue acquired if timeout happens in kgd_hqd_destroy()
Date: Sun, 4 Jan 2015 21:58:02 +0200	[thread overview]
Message-ID: <54A99B4A.4030606@amd.com> (raw)
In-Reply-To: <1420327880-25415-1-git-send-email-khoroshilov@ispras.ru>



On 01/04/2015 01:31 AM, Alexey Khoroshilov wrote:
> 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>
> ---
>  drivers/gpu/drm/radeon/radeon_kfd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c
> index 242fd8b1b221..335e29dbab05 100644
> --- a/drivers/gpu/drm/radeon/radeon_kfd.c
> +++ b/drivers/gpu/drm/radeon/radeon_kfd.c
> @@ -556,6 +556,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);
> 

Thanks for catching that!
Applied to my fixes tree.

	Oded

      reply	other threads:[~2015-01-04 19:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-03 23:31 Alexey Khoroshilov
2015-01-04 19:58 ` Oded Gabbay [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54A99B4A.4030606@amd.com \
    --to=oded.gabbay@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®