summaryrefslogtreecommitdiff
path: root/include/linux/user_events.h
diff options
context:
space:
mode:
authorBeau Belgrave <beaub@linux.microsoft.com>2023-05-20 02:07:41 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-05-24 04:08:33 +0300
commitff9e1632d69e596d8ca256deb07433a8f3565038 (patch)
tree01bbfbd82acf346b45615b32bc405331577bca7a /include/linux/user_events.h
parentdcbd1ac2668b5fa02069ea96d581ca3f70a7543c (diff)
downloadlinux-ff9e1632d69e596d8ca256deb07433a8f3565038.tar.xz
tracing/user_events: Document user_event_mm one-shot list usage
During 6.4 development it became clear that the one-shot list used by the user_event_mm's next field was confusing to others. It is not clear how this list is protected or what the next field usage is for unless you are familiar with the code. Add comments into the user_event_mm struct indicating lock requirement and usage. Also document how and why this approach was used via comments in both user_event_enabler_update() and user_event_mm_get_all() and the rules to properly use it. Link: https://lkml.kernel.org/r/20230519230741.669-5-beaub@linux.microsoft.com Link: https://lore.kernel.org/linux-trace-kernel/CAHk-=wicngggxVpbnrYHjRTwGE0WYscPRM+L2HO2BF8ia1EXgQ@mail.gmail.com/ Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/user_events.h')
-rw-r--r--include/linux/user_events.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/user_events.h b/include/linux/user_events.h
index 17d452b389de..8afa8c3a0973 100644
--- a/include/linux/user_events.h
+++ b/include/linux/user_events.h
@@ -20,6 +20,7 @@ struct user_event_mm {
struct list_head mms_link;
struct list_head enablers;
struct mm_struct *mm;
+ /* Used for one-shot lists, protected by event_mutex */
struct user_event_mm *next;
refcount_t refcnt;
refcount_t tasks;