mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
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>
This commit is contained in:
parent
1d83c3a20b
commit
a6ed2aee54
@ -138,8 +138,7 @@ static void osnoise_unregister_instance(struct trace_array *tr)
|
||||
if (!found)
|
||||
return;
|
||||
|
||||
synchronize_rcu();
|
||||
kfree(inst);
|
||||
kvfree_rcu(inst);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user