Re: [PATCH 1/2] ftrace: Update ftrace_ops->next pointer with rcu_assign_pointer()

2021-03-24 Thread Steven Rostedt
On Wed, 17 Mar 2021 18:25:28 +0800 Li Huafei wrote: > The unregistered ftrace_ops may be freed by the caller, so we should use > rcu_assign_pointer() in remove_ftrace_ops() to remove the ftrace_ops, > which ensures that no more users will reference the ftrace_ops after > synchronize_rcu() is

[PATCH 1/2] ftrace: Update ftrace_ops->next pointer with rcu_assign_pointer()

2021-03-17 Thread Li Huafei
The unregistered ftrace_ops may be freed by the caller, so we should use rcu_assign_pointer() in remove_ftrace_ops() to remove the ftrace_ops, which ensures that no more users will reference the ftrace_ops after synchronize_rcu() is called. Signed-off-by: Li Huafei --- kernel/trace/ftrace.c | 4