Skip to content

ftrace: Use guard to take ftrace_lock

Steven Rostedt linux-trace-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5fgraph: Use guard(mutex)(&ftrace_lock) for unregister_ftrace_graph()kernel/trace/fgraph.c+4 -60 replies
2/5ftrace: Use guard for match_records()kernel/trace/ftrace.c+6 -120 replies
3/5ftrace: Use guard to lock ftrace_lock in cache_mod()kernel/trace/ftrace.c+6 -110 replies
4/5ftrace: Use guard to take the ftrace_lock in release_probe()kernel/trace/ftrace.c+1 -20 replies
5/5ftrace: Use guard to take ftrace_lock in ftrace_graph_set_hash()kernel/trace/ftrace.c+4 -112 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] ftrace: Use guard to take ftrace_lock

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(-)