Commit 5740671e authored by Chris Wilson's avatar Chris Wilson

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190612132830.31221-1-chris@chris-wilson.co.uk
parent c412187d
...@@ -216,8 +216,12 @@ reservation_object_unlock(struct reservation_object *obj) ...@@ -216,8 +216,12 @@ reservation_object_unlock(struct reservation_object *obj)
{ {
#ifdef CONFIG_DEBUG_MUTEXES #ifdef CONFIG_DEBUG_MUTEXES
/* Test shared fence slot reservation */ /* Test shared fence slot reservation */
if (obj->fence) if (rcu_access_pointer(obj->fence)) {
obj->fence->shared_max = obj->fence->shared_count; struct reservation_object_list *fence =
reservation_object_get_list(obj);
fence->shared_max = fence->shared_count;
}
#endif #endif
ww_mutex_unlock(&obj->lock); ww_mutex_unlock(&obj->lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment