diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-08-09 15:37:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-09 20:07:55 +0200 |
commit | eb67901b5d617eeca2939699a3aa5e06c3ea4fe2 (patch) | |
tree | 6b67671b510844cfa9417b31c1867b39f6d9a285 /kernel | |
parent | 73b5c3dc570d96e671f3ce5537ebda70237b4181 (diff) | |
download | linux-stable-eb67901b5d617eeca2939699a3aa5e06c3ea4fe2.tar.gz linux-stable-eb67901b5d617eeca2939699a3aa5e06c3ea4fe2.tar.bz2 linux-stable-eb67901b5d617eeca2939699a3aa5e06c3ea4fe2.zip |
uprobes: Use synchronize_rcu() not synchronize_sched()
commit 016f8ffc48cb01d1e7701649c728c5d2e737d295 upstream.
While debugging another bug, I was looking at all the synchronize*()
functions being used in kernel/trace, and noticed that trace_uprobes was
using synchronize_sched(), with a comment to synchronize with
{u,ret}_probe_trace_func(). When looking at those functions, the data is
protected with "rcu_read_lock()" and not with "rcu_read_lock_sched()". This
is using the wrong synchronize_*() function.
Link: http://lkml.kernel.org/r/20180809160553.469e1e32@gandalf.local.home
Cc: stable@vger.kernel.org
Fixes: 70ed91c6ec7f8 ("tracing/uprobes: Support ftrace_event_file base multibuffer")
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_uprobe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index f7e75f3dfcb2..a4c3219ec62d 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -957,7 +957,7 @@ probe_event_disable(struct trace_uprobe *tu, struct ftrace_event_file *file) list_del_rcu(&link->list); /* synchronize with u{,ret}probe_trace_func */ - synchronize_sched(); + synchronize_rcu(); kfree(link); if (!list_empty(&tu->tp.files)) |