[PATCH v2 0/6] tracing/kprobes: Cleanup with guard and __free

From: Masami Hiramatsu (Google)
Date: Sun Jan 05 2025 - 07:47:47 EST


Hi,

Here is the 2nd version of the series to fix and cleanup probe events in
ftrace with __free().
Fix [2/6] according to Oleg's comment to check the argument and add
cleanup.h, update [3/6] to apply it cleanly on probes/for-next, and fix
[5/6] to assign NULL to 'tk' instead of using no_free_ptr() after
registering it successfully to avoid __must_check_fn warning.

Thanks,

---

Masami Hiramatsu (Google) (6):
tracing/kprobes: Fix to free objects when failed to copy a symbol
Provide __free(argv) for argv_split() users
tracing: Use __free() for argv in dynevent
tracing: Use __free() in trace_probe for cleanup
tracing: Use __free() for kprobe events to cleanup
tracing/kprobes: Simplify __trace_kprobe_create() by removing gotos


include/linux/string.h | 3 +
kernel/trace/trace_dynevent.c | 23 +++----
kernel/trace/trace_kprobe.c | 127 ++++++++++++++++++++---------------------
kernel/trace/trace_probe.c | 52 ++++++-----------
4 files changed, 91 insertions(+), 114 deletions(-)

--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>