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,12 +5667,15 @@ int modify_ftrace_direct(unsigned long ip, ...@@ -5667,12 +5667,15 @@ int modify_ftrace_direct(unsigned long ip,
ret = 0; ret = 0;
} }
if (unlikely(ret && new_direct)) { if (ret) {
direct->count++; direct->addr = old_addr;
list_del_rcu(&new_direct->next); if (unlikely(new_direct)) {
synchronize_rcu_tasks(); direct->count++;
kfree(new_direct); list_del_rcu(&new_direct->next);
ftrace_direct_func_count--; synchronize_rcu_tasks();
kfree(new_direct);
ftrace_direct_func_count--;
}
} }
out_unlock: out_unlock:
......
...@@ -44,7 +44,7 @@ enum { ERRORS }; ...@@ -44,7 +44,7 @@ enum { ERRORS };
static const char *err_text[] = { ERRORS }; static const char *err_text[] = { ERRORS };
DEFINE_MUTEX(lastcmd_mutex); static DEFINE_MUTEX(lastcmd_mutex);
static char *last_cmd; static char *last_cmd;
static int errpos(const char *str) 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