OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c412187
)
dma-fence/reservation: Markup rcu protected access for DEBUG_MUTEXES
author
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 12 Jun 2019 13:28:30 +0000
(14:28 +0100)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 12 Jun 2019 14:27:44 +0000
(15:27 +0100)
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
include/linux/reservation.h
patch
|
blob
|
history
diff --git
a/include/linux/reservation.h
b/include/linux/reservation.h
index
ee75076
..
644a22d
100644
(file)
--- 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);
}