tracing/user_events: Ensure bit is cleared on unregister
authorBeau Belgrave <beaub@linux.microsoft.com>
Tue, 25 Apr 2023 22:51:05 +0000 (15:51 -0700)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 26 Apr 2023 01:04:16 +0000 (21:04 -0400)
commit17b439db21d5dbe70c419e982262621e5e6aba7f
tree20e77f8a2a91e04fbfdb30355df7eb5fbb03643d
parentcd98c93286a30cc4588dfd02453bec63c2f4acf4
tracing/user_events: Ensure bit is cleared on unregister

If an event is enabled and a user process unregisters user_events, the
bit is left set. Fix this by always clearing the bit in the user process
if unregister is successful.

Update abi self-test to ensure this occurs properly.

Link: https://lkml.kernel.org/r/20230425225107.8525-3-beaub@linux.microsoft.com
Suggested-by: Doug Cook <dcook@linux.microsoft.com>
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_user.c
tools/testing/selftests/user_events/abi_test.c