summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-07-29 08:29:58 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-08-10 17:13:20 +0900
commit29a86c5e6361caffa7e75e891169e813f82ff688 (patch)
tree4c2c937a81d136ecf25b566e4eaf89376552266b
parentd093d4524bb12eda49c3654cb04ad4663c2471f8 (diff)
fprobe: Simplify fprobe_remove_ips() by reusing existing helpers
fprobe_remove_ips() manually duplicates the unregister and filter-removal logic for both graph and ftrace ops. Simplify it by delegating to the existing fprobe_graph_remove_ips() and fprobe_ftrace_remove_ips() helpers. Link: https://lore.kernel.org/all/178528139798.102586.5349128066643420018.stgit@devnote2/ Assisted-by: Antigravity:gemini-3.6-flash Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/trace/fprobe.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
index 2727f8861fa3..8c50b0645e96 100644
--- a/kernel/trace/fprobe.c
+++ b/kernel/trace/fprobe.c
@@ -464,15 +464,8 @@ static bool fprobe_exists_on_hash(unsigned long ip, bool ftrace)
#ifdef CONFIG_MODULES
static void fprobe_remove_ips(unsigned long *ips, unsigned int cnt)
{
- if (!nr_fgraph_fprobes)
- __fprobe_graph_unregister();
- else if (cnt)
- ftrace_set_filter_ips(&fprobe_graph_ops.ops, ips, cnt, 1, 0);
-
- if (!nr_ftrace_fprobes)
- __fprobe_ftrace_unregister();
- else if (cnt)
- ftrace_set_filter_ips(&fprobe_ftrace_ops, ips, cnt, 1, 0);
+ fprobe_graph_remove_ips(ips, cnt);
+ fprobe_ftrace_remove_ips(ips, cnt);
}
#endif
#else