diff options
author | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2021-11-24 12:03:08 +0100 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-12-06 23:53:50 +0100 |
commit | a6ed2aee54644cfa2d04ca86308767f5c3a087e8 (patch) | |
tree | 0b05e0a616eabfcacd5f2629cb6f2d923b43f985 /kernel/trace/trace_probe.c | |
parent | tracing: Fix synth_event_add_val() kernel-doc comment (diff) | |
download | linux-a6ed2aee54644cfa2d04ca86308767f5c3a087e8.tar.xz linux-a6ed2aee54644cfa2d04ca86308767f5c3a087e8.zip |
tracing: Switch to kvfree_rcu() API
Instead of invoking a synchronize_rcu() to free a pointer
after a grace period we can directly make use of new API
that does the same but in more efficient way.
Link: https://lkml.kernel.org/r/20211124110308.2053-10-urezki@gmail.com
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_probe.c')
-rw-r--r-- | kernel/trace/trace_probe.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index 3ed2a3f37297..8a3822818bf8 100644 --- a/kernel/trace/trace_probe.c +++ b/kernel/trace/trace_probe.c @@ -1138,8 +1138,7 @@ int trace_probe_remove_file(struct trace_probe *tp, return -ENOENT; list_del_rcu(&link->list); - synchronize_rcu(); - kfree(link); + kvfree_rcu(link); if (list_empty(&tp->event->files)) trace_probe_clear_flag(tp, TP_FLAG_TRACE); |