Re: probe_event_disable()->synchronize_sched()
From: Oleg Nesterov
Date: Thu Jul 03 2014 - 11:43:08 EST
On 07/03, Namhyung Kim wrote:
>
> On Tue, 1 Jul 2014 21:31:47 +0200, Oleg Nesterov wrote:
> >
> > And. I am puzzled by probe_event_disable()->synchronize_sched(). Why
> > do we need it? I mean, why we can't use call_rcu() ? The comment says
> > "synchronize with u{,ret}probe_trace_func" but it doesn't explain _why_
> > do we need to sync.
>
> It looks like the code was copied from trace_kprobe.c file. But IIUC,
> unlike kprobes, uprobe events are always called in a process context.
>
> Also u{,ret}probe_trace_func() call handlers under rcu_read_lock() not
> rcu_read_lock_sched() so I guess the synchronize_sched() can go.
Heh ;) I didn't even notice that "synchronize" and "lock" do not match.
So this should be fixed anyway. But lets discuss other issues first.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/