summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2026-10-31 21:24:35 +0000
committerSteven Rostedt <rostedt@goodmis.org>2026-11-20 10:02:36 -0500
commit0fbdc293697a5d72dc985e533eef5155a1b264cc (patch)
treef2febc4699bcecd7277f300b6788f9cc13050236 /rust/kernel/alloc/kvec
parent5f855410554564ca05903979e6dab96e754d8773 (diff)
tracing/user_events: Don't free an event that a dynamic event still references
An eprobe takes a reference on the call of the event it attaches to, and kprobe, uprobe, fprobe and synth events all refuse to go away while trace_event_dyn_busy() says such a reference exists. user_events never checks it, so a user event can be freed under an eprobe: echo 'u:test u32 a' >> dynamic_events echo 'e:ep user_events/test a=$a' >> dynamic_events echo '-:user_events/test u32 a' >> dynamic_events echo '-:eprobes/ep' >> dynamic_events The last write drops the reference on the freed call. If the last fd of a non-persistent event closes while such a reference is held, the delayed destroy now fails. Mark the event persistent then, so it can still be deleted once the reference is gone instead of being leaked. Return -EBUSY from destroy_user_event() in that case. Fixes: 7f5a08c79df3 ("user_events: Add minimal support for trace_event into ftrace") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261031212453.16116-1-devnexen@gmail.com Signed-off-by: David Carlier <devnexen@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions