[PATCH] dma-fence: fix dma_fence_get_rcu_safe
Christian König
christian.koenig at amd.com
Mon Sep 11 11:06:32 UTC 2017
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.
Regards,
Christian.
More information about the dri-devel
mailing list