Commit 3ebc98c
ftrace: Add missing ftrace_lock to update_ftrace_direct_add/del
Ihor and Kumar reported splat from ftrace_get_addr_curr [1], which happened
because of the missing ftrace_lock in update_ftrace_direct_add/del functions
allowing concurrent access to ftrace internals.
The ftrace_update_ops function must be guarded by ftrace_lock, adding that.
Fixes: 05dc5e9 ("ftrace: Add update_ftrace_direct_add function")
Fixes: 8d2c123 ("ftrace: Add update_ftrace_direct_del function")
Reported-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Reported-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Closes: https://lore.kernel.org/bpf/1b58ffb2-92ae-433a-ba46-95294d6edea2@linux.dev/
Tested-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20260302081622.165713-1-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent af4e9ef commit 3ebc98c
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6404 | 6404 | | |
6405 | 6405 | | |
6406 | 6406 | | |
| 6407 | + | |
6407 | 6408 | | |
6408 | 6409 | | |
6409 | 6410 | | |
| |||
6530 | 6531 | | |
6531 | 6532 | | |
6532 | 6533 | | |
| 6534 | + | |
6533 | 6535 | | |
6534 | 6536 | | |
6535 | 6537 | | |
| |||
0 commit comments