diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-12 14:28:30 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-12 15:27:44 +0100 |
commit | 5740671e596bdc3986a5391997de194300970201 (patch) | |
tree | 3036da43b1483e5fced875dd1d1db7e247bc4987 /include | |
parent | gpu: drm: bridge: sii9234: simplify getting the adapter of a client (diff) | |
download | linux-dev-5740671e596bdc3986a5391997de194300970201.tar.xz linux-dev-5740671e596bdc3986a5391997de194300970201.zip |
dma-fence/reservation: Markup rcu protected access for DEBUG_MUTEXES
Mark the access to reservation_object.fence as being protected to
silence sparse.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190612132830.31221-1-chris@chris-wilson.co.uk
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/reservation.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/reservation.h b/include/linux/reservation.h index ee750765cc94..644a22dbe53b 100644 --- a/include/linux/reservation.h +++ b/include/linux/reservation.h @@ -216,8 +216,12 @@ reservation_object_unlock(struct reservation_object *obj) { #ifdef CONFIG_DEBUG_MUTEXES /* Test shared fence slot reservation */ - if (obj->fence) - obj->fence->shared_max = obj->fence->shared_count; + if (rcu_access_pointer(obj->fence)) { + struct reservation_object_list *fence = + reservation_object_get_list(obj); + + fence->shared_max = fence->shared_count; + } #endif ww_mutex_unlock(&obj->lock); } |