LKML Archive on
 help / color / Atom feed
* [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()
@ 2018-08-09 20:05 Steven Rostedt
  2018-08-10 11:35 ` Oleg Nesterov
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2018-08-09 20:05 UTC (permalink / raw)
  To: LKML
  Cc: zhangwei(Jovi),
	Masami Hiramatsu, Oleg Nesterov, Namhyung Kim, Andrew Morton,

From: "Steven Rostedt (VMware)" <>

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.

Fixes: 70ed91c6ec7f8 ("tracing/uprobes: Support ftrace_event_file base multibuffer")
Signed-off-by: Steven Rostedt (VMware) <>
 kernel/trace/trace_uprobe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index bf89a51e740d..ac02fafc9f1b 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -952,7 +952,7 @@ probe_event_disable(struct trace_uprobe *tu, struct trace_event_file *file)
 		/* synchronize with u{,ret}probe_trace_func */
-		synchronize_sched();
+		synchronize_rcu();
 		if (!list_empty(&tu->tp.files))

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 20:05 [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched() Steven Rostedt
2018-08-10 11:35 ` Oleg Nesterov
2018-08-10 11:42   ` Oleg Nesterov
2018-08-10 12:48   ` Steven Rostedt
2018-08-10 13:36     ` Oleg Nesterov
2018-08-10 13:44       ` Steven Rostedt
2018-08-10 14:06         ` Oleg Nesterov

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone