Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Joonas Lahtinen" <joonas.lahtinen@intel.com>
Cc: linaro-mm-sig@lists.linaro.org, Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()
Date: Mon, 29 Nov 2021 13:46:53 +0100	[thread overview]
Message-ID: <ee128e237dbc2b6b2341b49ab07661c1f1b65e0b.camel@linux.intel.com> (raw)
In-Reply-To: <e4d8e272-8175-4298-f227-240febc0bda0@gmail.com>

On Mon, 2021-11-29 at 13:33 +0100, Christian König wrote:
> Am 29.11.21 um 13:23 schrieb Thomas Hellström:
> > Hi, Christian,
> > 
> > On Mon, 2021-11-29 at 09:21 +0100, Christian König wrote:
> > > Am 29.11.21 um 08:35 schrieb Thomas Hellström:
> > > > If a dma_fence_array is reported signaled by a call to
> > > > dma_fence_is_signaled(), it may leak the PENDING_ERROR status.
> > > > 
> > > > Fix this by clearing the PENDING_ERROR status if we return true
> > > > in
> > > > dma_fence_array_signaled().
> > > > 
> > > > Fixes: 1f70b8b812f3 ("dma-fence: Propagate errors to dma-fence-
> > > > array container")
> > > > Cc: linaro-mm-sig@lists.linaro.org
> > > > Cc: Christian König <ckoenig.leichtzumerken@gmail.com>
> > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > > Signed-off-by: Thomas Hellström
> > > > <thomas.hellstrom@linux.intel.com>
> > > Reviewed-by: Christian König <christian.koenig@amd.com>
> > How are the dma-buf / dma-fence patches typically merged? If i915
> > is
> > the only fence->error user, could we take this through drm-intel to
> > avoid a backmerge for upcoming i915 work?
> 
> Well that one here looks like a bugfix to me, so either through 
> drm-misc-fixes ore some i915 -fixes branch sounds fine to me.
> 
> If you have any new development based on that a backmerge of the -
> fixes 
> into your -next branch is unavoidable anyway.

Ok, I'll check with Joonas if I can take it through
drm-intel-gt-next, since fixes are cherry-picked from that one. Patch
will then appear in both the -fixes and the -next branch.

Thanks,
/Thomas


> 
> Regards,
> Christian.
> 
> > 
> > /Thomas
> > 
> > 
> > > > ---
> > > >    drivers/dma-buf/dma-fence-array.c | 6 +++++-
> > > >    1 file changed, 5 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-
> > > > buf/dma-fence-array.c
> > > > index d3fbd950be94..3e07f961e2f3 100644
> > > > --- a/drivers/dma-buf/dma-fence-array.c
> > > > +++ b/drivers/dma-buf/dma-fence-array.c
> > > > @@ -104,7 +104,11 @@ static bool
> > > > dma_fence_array_signaled(struct
> > > > dma_fence *fence)
> > > >    {
> > > >          struct dma_fence_array *array =
> > > > to_dma_fence_array(fence);
> > > >    
> > > > -       return atomic_read(&array->num_pending) <= 0;
> > > > +       if (atomic_read(&array->num_pending) > 0)
> > > > +               return false;
> > > > +
> > > > +       dma_fence_array_clear_pending_error(array);
> > > > +       return true;
> > > >    }
> > > >    
> > > >    static void dma_fence_array_release(struct dma_fence *fence)
> > 
> 



  reply	other threads:[~2021-11-29 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29  7:35 [Intel-gfx] [PATCH] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled() Thomas Hellström
2021-11-29  8:21 ` Christian König
2021-11-29 12:23   ` Thomas Hellström
2021-11-29 12:33     ` Christian König
2021-11-29 12:46       ` Thomas Hellström [this message]
2021-11-29 12:55         ` Christian König
2021-11-29 13:14           ` Joonas Lahtinen
2021-11-30  8:43             ` [Intel-gfx] [Linaro-mm-sig] " Daniel Vetter
2021-11-29  9:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-29 11:16 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=ee128e237dbc2b6b2341b49ab07661c1f1b65e0b.camel@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@intel.com \
    --cc=linaro-mm-sig@lists.linaro.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