diff options
author | Beau Belgrave <[email protected]> | 2022-03-09 16:11:41 -0800 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2022-03-11 11:49:24 -0500 |
commit | 7e348b325bc40eb52aead4d57a1f90d33ea834fc (patch) | |
tree | 3cf73f757cbc4b1d1a483d8ad8e3fe7ee7306f09 /scripts/bpf_doc.py | |
parent | 3a73333fb370f7b65de9d94c53df503642bda789 (diff) |
user_events: Prevent dyn_event delete racing with ioctl add/delete
Find user_events always while under the event_mutex and before leaving
the lock, add a ref count to the user_event. This ensures that all paths
under the event_mutex that check the ref counts will be synchronized.
The ioctl add/delete paths are protected by the reg_mutex. However,
dyn_event is only protected by the event_mutex. The dyn_event delete
path cannot acquire reg_mutex, since that could cause a deadlock between
the ioctl delete case acquiring event_mutex after acquiring the reg_mutex.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Beau Belgrave <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions