linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] ftrace: Use guard to take ftrace_lock
@ 2024-10-28  7:12 Steven Rostedt
  2024-10-28  7:12 ` [PATCH 1/5] fgraph: Use guard(mutex)(&ftrace_lock) for unregister_ftrace_graph() Steven Rostedt
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Steven Rostedt @ 2024-10-28  7:12 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Thomas Gleixner, Peter Zijlstra

The ftrace infrastructure uses ftrace_lock to protect several critical
paths. But the functions have that take the ftrace_lock has error paths that
require the lock to be released. Use the guard() helper to take the
ftrace_lock in theses functions which simplify the early exit paths.

Steven Rostedt (5):
      fgraph: Use guard(mutex)(&ftrace_lock) for unregister_ftrace_graph()
      ftrace: Use guard for match_records()
      ftrace: Use guard to lock ftrace_lock in cache_mod()
      ftrace: Use guard to take the ftrace_lock in release_probe()
      ftrace: Use guard to take ftrace_lock in ftrace_graph_set_hash()

----
 kernel/trace/fgraph.c | 10 ++++------
 kernel/trace/ftrace.c | 53 +++++++++++++++++----------------------------------
 2 files changed, 21 insertions(+), 42 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-10-28 14:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28  7:12 [PATCH 0/5] ftrace: Use guard to take ftrace_lock Steven Rostedt
2024-10-28  7:12 ` [PATCH 1/5] fgraph: Use guard(mutex)(&ftrace_lock) for unregister_ftrace_graph() Steven Rostedt
2024-10-28  7:12 ` [PATCH 2/5] ftrace: Use guard for match_records() Steven Rostedt
2024-10-28  7:12 ` [PATCH 3/5] ftrace: Use guard to lock ftrace_lock in cache_mod() Steven Rostedt
2024-10-28  7:12 ` [PATCH 4/5] ftrace: Use guard to take the ftrace_lock in release_probe() Steven Rostedt
2024-10-28  7:12 ` [PATCH 5/5] ftrace: Use guard to take ftrace_lock in ftrace_graph_set_hash() Steven Rostedt
2024-10-28  9:16   ` Peter Zijlstra
2024-10-28 14:18     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).