From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Christian König" <christian.koenig@amd.com>,
"Daniel Vetter" <daniel@ffwll.ch>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH] dma-fence: fix dma_fence_get_rcu_safe
Date: Thu, 21 Sep 2017 09:29:13 +0200 [thread overview]
Message-ID: <2040482c-b0b7-a527-6fe6-5e37f238ec90@linux.intel.com> (raw)
In-Reply-To: <7f14fc7c-2d56-598b-5049-0155df8327e4@amd.com>
Op 21-09-17 om 09:00 schreef Christian König:
> Am 20.09.2017 um 20:20 schrieb Daniel Vetter:
>> On Mon, Sep 11, 2017 at 01:06:32PM +0200, Christian König wrote:
>>> Am 11.09.2017 um 12:01 schrieb Chris Wilson:
>>>> [SNIP]
>>>>> Yeah, but that is illegal with a fence objects.
>>>>>
>>>>> When anybody allocates fences this way it breaks at least
>>>>> reservation_object_get_fences_rcu(),
>>>>> reservation_object_wait_timeout_rcu() and
>>>>> reservation_object_test_signaled_single().
>>>> Many, many months ago I sent patches to fix them all.
>>> Found those after a bit a searching. Yeah, those patches where proposed more
>>> than a year ago, but never pushed upstream.
>>>
>>> Not sure if we really should go this way. dma_fence objects are shared
>>> between drivers and since we can't judge if it's the correct fence based on
>>> a criteria in the object (only the read counter which is outside) all
>>> drivers need to be correct for this.
>>>
>>> I would rather go the way and change dma_fence_release() to wrap
>>> fence->ops->release into call_rcu() to keep the whole RCU handling outside
>>> of the individual drivers.
>> Hm, I entirely dropped the ball on this, I kinda assumed that we managed
>> to get some agreement on this between i915 and dma_fence. Adding a pile
>> more people.
>
> For the meantime I've send a v2 of this patch to fix at least the buggy return of NULL when we fail to grab the RCU reference but keeping the extra checking for now.
>
> Can I get an rb on this please so that we fix at least the bug at hand?
>
> Thanks,
> Christian.
Done.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-09-21 7:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 13:27 [PATCH] dma-fence: fix dma_fence_get_rcu_safe Christian König
2017-09-04 13:40 ` Chris Wilson
2017-09-11 8:50 ` Christian König
2017-09-11 8:59 ` Chris Wilson
2017-09-11 9:06 ` Christian König
2017-09-11 9:23 ` Chris Wilson
2017-09-11 9:57 ` Christian König
2017-09-11 10:01 ` Chris Wilson
2017-09-11 11:06 ` Christian König
2017-09-20 18:20 ` Daniel Vetter
2017-09-21 7:00 ` Christian König
2017-09-21 7:29 ` Maarten Lankhorst [this message]
2017-09-29 12:34 ` Joonas Lahtinen
[not found] <1504530994-2464-1-git-send-email-deathsimple@vodafone.de>
2017-09-04 15:50 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2017-09-04 13:20 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=2040482c-b0b7-a527-6fe6-5e37f238ec90@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=tvrtko.ursulin@linux.intel.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