History

dma-fence/reservation: Markup rcu protected access for DEBUG_MUTEXES

Mark the access to reservation_object.fence as being protected to silence sparse.

Chris Wilson committed 7 years ago

Commit 57406711 parent c4121871 file · +6 −2Browse files

Unified · Split

include/linux/reservation.h+6−2
@@ -216,8 +216,12 @@ reservation_object_unlock(struct reservation_object *obj) · 215 unmodified lines
216216 {
217217 #ifdef CONFIG_DEBUG_MUTEXES
218218 /* Test shared fence slot reservation */
219− if (obj->fence)
220− obj->fence->shared_max = obj->fence->shared_count;
219+ if (rcu_access_pointer(obj->fence)) {
220+ struct reservation_object_list *fence =
221+ reservation_object_get_list(obj);
222+
223+ fence->shared_max = fence->shared_count;
224+ }
221225 #endif
222226 ww_mutex_unlock(&obj->lock);
223227 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t