All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu once more
Date: Mon, 22 Jan 2018 14:42:28 -0500	[thread overview]
Message-ID: <1516650148.2388.7.camel@redhat.com> (raw)
In-Reply-To: <20180122193239.7674-1-christian.koenig@amd.com>

Could you please make sure to add Cc: stable@vger.kernel.org for this? This is
causing crashing of wayland sessions on Fedora so we should definitely get
this into stable.

Other then that:

Tested-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>

On Mon, 2018-01-22 at 20:32 +0100, Christian König wrote:
> We need to set shared_count even if we already have a fence to wait for.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>  drivers/dma-buf/reservation.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
> index 461afa9febd4..649c0cebf5b1 100644
> --- a/drivers/dma-buf/reservation.c
> +++ b/drivers/dma-buf/reservation.c
> @@ -506,14 +506,14 @@ long reservation_object_wait_timeout_rcu(struct
> reservation_object *obj,
>  		fence = NULL;
>  	}
>  
> -	if (!fence && wait_all) {
> +	if (wait_all) {
>  		struct reservation_object_list *fobj =
>  						rcu_dereference(obj-
> >fence);
>  
>  		if (fobj)
>  			shared_count = fobj->shared_count;
>  
> -		for (i = 0; i < shared_count; ++i) {
> +		for (i = 0; !fence && i < shared_count; ++i) {
>  			struct dma_fence *lfence = rcu_dereference(fobj-
> >shared[i]);
>  
>  			if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
-- 
Cheers,
	Lyude Paul
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-01-22 19:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 19:32 [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu once more Christian König
2018-01-22 19:42 ` Lyude Paul [this message]
2018-01-22 19:48   ` Christian König
2018-01-22 19:47 ` Chris Wilson
2018-01-22 20:01   ` Christian König

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=1516650148.2388.7.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.