diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-11 21:16:33 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-11 21:16:33 +0300 |
commit | 600b18f88f2625ba48542dfeaa5fe8b23b3fd2c4 (patch) | |
tree | 585207bd9519f564384f3b3fa9a9c0fb2fa3f0fc /kernel/trace/ftrace.c | |
parent | f54ca91fe6f25c2028f953ce82f19ca2ea0f07bb (diff) | |
parent | 2e6e9058d13a22a6fdd36a8c444ac71d9656003a (diff) | |
download | linux-600b18f88f2625ba48542dfeaa5fe8b23b3fd2c4.tar.xz |
Merge tag 'trace-v5.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt:
"Two locking fixes:
- Add mutex protection to ring_buffer_reset()
- Fix deadlock in modify_ftrace_direct_multi()"
* tag 'trace-v5.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
ftrace/direct: Fix lockup in modify_ftrace_direct_multi
ring-buffer: Protect ring_buffer_reset() from reentrancy
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 007a3ded0358..30bc880c3849 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -5602,10 +5602,11 @@ int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr) } } + mutex_unlock(&ftrace_lock); + /* Removing the tmp_ops will add the updated direct callers to the functions */ unregister_ftrace_function(&tmp_ops); - mutex_unlock(&ftrace_lock); out_direct: mutex_unlock(&direct_mutex); return err; |