]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: Add tracing_reset_all_online_cpus_unlocked() function
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 23 Nov 2022 19:25:57 +0000 (14:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 08:18:35 +0000 (10:18 +0200)
commit4d02a166cbee9356e43a9500627daced98fef615
treef72f6fab8041992d3a47de0a21941ca4c3d37504
parente14e9cc588bd44ca452008e0dcf4f796c5fd58a8
tracing: Add tracing_reset_all_online_cpus_unlocked() function

commit e18eb8783ec4949adebc7d7b0fdb65f65bfeefd9 upstream.

Currently the tracing_reset_all_online_cpus() requires the
trace_types_lock held. But only one caller of this function actually has
that lock held before calling it, and the other just takes the lock so
that it can call it. More users of this function is needed where the lock
is not held.

Add a tracing_reset_all_online_cpus_unlocked() function for the one use
case that calls it without being held, and also add a lockdep_assert to
make sure it is held when called.

Then have tracing_reset_all_online_cpus() take the lock internally, such
that callers do not need to worry about taking it.

Link: https://lkml.kernel.org/r/20221123192741.658273220@goodmis.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Zheng Yejian <zhengyejian1@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_events.c