Skip to content
Commit b016cd6e authored by Chris Wilson's avatar Chris Wilson
Browse files

dma-buf: Restore seqlock around dma_resv updates



This reverts
67c97fb7 ("dma-buf: add reservation_object_fences helper")
dd7a7d1f ("drm/i915: use new reservation_object_fences helper")
0e1d8083 ("dma-buf: further relax reservation_object_add_shared_fence")
5d344f58 ("dma-buf: nuke reservation_object seq number")

The scenario that defeats simply grabbing a set of shared/exclusive
fences and using them blissfully under RCU is that any of those fences
may be reallocated by a SLAB_TYPESAFE_BY_RCU fence slab cache. In this
scenario, while keeping the rcu_read_lock we need to establish that no
fence was changed in the dma_resv after a read (or full) memory barrier.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190814182401.25009-1-chris@chris-wilson.co.uk
parent dc2e1e5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment