Commit 1a8a804a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'trace-v6.3-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:
 "A couple more minor fixes:

   - Reset direct->addr back to its original value on error in updating
     the direct trampoline code

   - Make lastcmd_mutex static"

* tag 'trace-v6.3-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/synthetic: Make lastcmd_mutex static
  ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct()
parents 6fda0bb8 31c68396
......@@ -5667,13 +5667,16 @@ int modify_ftrace_direct(unsigned long ip,
ret = 0;
}
if (unlikely(ret && new_direct)) {
if (ret) {
direct->addr = old_addr;
if (unlikely(new_direct)) {
direct->count++;
list_del_rcu(&new_direct->next);
synchronize_rcu_tasks();
kfree(new_direct);
ftrace_direct_func_count--;
}
}
out_unlock:
mutex_unlock(&ftrace_lock);
......
......@@ -44,7 +44,7 @@ enum { ERRORS };
static const char *err_text[] = { ERRORS };
DEFINE_MUTEX(lastcmd_mutex);
static DEFINE_MUTEX(lastcmd_mutex);
static char *last_cmd;
static int errpos(const char *str)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment