From: Gustavo Padovan <gustavo@padovan.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Gustavo Padovan <gustavo.padovan@collabora.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] dma-buf/sw_sync: clean up list before signaling the fence
Date: Mon, 31 Jul 2017 16:32:55 -0300 [thread overview]
Message-ID: <20170731193255.GB1882@jade> (raw)
In-Reply-To: <150140580985.3218.5704136845095445310@mail.alporthouse.com>
2017-07-30 Chris Wilson <chris@chris-wilson.co.uk>:
> Quoting Gustavo Padovan (2017-07-29 16:22:16)
> > From: Gustavo Padovan <gustavo.padovan@collabora.com>
> >
> > If userspace already dropped its own reference by closing the sw_sync
> > fence fd we might end up in a deadlock where
> > dma_fence_is_signaled_locked() will trigger the release of the fence and
> > thus try to hold the lock to remove the fence from the list.
> >
> > dma_fence_is_signaled_locked() tries to release/free the fence and hold
> > the lock in the process.
> >
> > We fix that by changing the order operation and clean up the list and
> > rb-tree first.
> >
> > v2: Drop the fence get/put dance and manipulate the list first (Chris Wilson)
> >
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks for reviewing. Pushed to drm-misc-next.
Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-07-31 19:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-29 15:22 [PATCH 1/3] dma-buf/sw_sync: move timeline_fence_ops around Gustavo Padovan
2017-07-29 15:22 ` [PATCH 2/3] dma-buf/sw_sync: clean up list before signaling the fence Gustavo Padovan
2017-07-30 9:10 ` Chris Wilson
2017-07-31 19:32 ` Gustavo Padovan [this message]
2017-07-29 15:22 ` [PATCH 3/3] selftests: sync: add test that closes the fd before fence signal Gustavo Padovan
2017-07-30 9:20 ` Chris Wilson
2017-07-31 19:43 ` Gustavo Padovan
2017-08-02 19:45 ` Shuah Khan
2017-08-02 20:28 ` Gustavo Padovan
2017-07-30 9:09 ` [PATCH 1/3] dma-buf/sw_sync: move timeline_fence_ops around Chris Wilson
2017-07-31 19:32 ` Gustavo Padovan
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=20170731193255.GB1882@jade \
--to=gustavo@padovan.org \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.com \
/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