Skip to content

Commit a6ed2ae

Browse files
urezkirostedt
authored andcommitted
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/[email protected] Signed-off-by: Uladzislau Rezki (Sony) <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 1d83c3a commit a6ed2ae

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

kernel/trace/trace_osnoise.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ static void osnoise_unregister_instance(struct trace_array *tr)
138138
if (!found)
139139
return;
140140

141-
synchronize_rcu();
142-
kfree(inst);
141+
kvfree_rcu(inst);
143142
}
144143

145144
/*

kernel/trace/trace_probe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,7 @@ int trace_probe_remove_file(struct trace_probe *tp,
11381138
return -ENOENT;
11391139

11401140
list_del_rcu(&link->list);
1141-
synchronize_rcu();
1142-
kfree(link);
1141+
kvfree_rcu(link);
11431142

11441143
if (list_empty(&tp->event->files))
11451144
trace_probe_clear_flag(tp, TP_FLAG_TRACE);

0 commit comments

Comments
 (0)