Re: [PATCH -tip ] [BUGFIX] kprobes: Fix a double lock bug ofkprobe_mutex

From: Ingo Molnar
Date: Fri Apr 19 2013 - 03:25:11 EST



* Ingo Molnar <mingo@xxxxxxxxxx> wrote:

>
> * Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> > On Thu, Apr 18, 2013 at 06:33:18PM +0900, Masami Hiramatsu wrote:
> > > Fix a double locking bug caused when debug.kprobe-optimization=0.
> > > While the proc_kprobes_optimization_handler locks kprobe_mutex,
> > > wait_for_kprobe_optimizer locks it again and that causes a double lock.
> > > To fix the bug, this introduces different mutex for protecting
> > > sysctl parameter and locks it in proc_kprobes_optimization_handler.
> > > Of course, since we need to lock kprobe_mutex when touching kprobes
> > > resources, that is done in *optimize_all_kprobes().
> > >
> > > This bug was from ad72b3bea744b4db01c89af0f86f3e8920d354df
> > >
> > > Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx>
> > > Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> > > Cc: Tejun Heo <tj@xxxxxxxxxx>
> > > Cc: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
> > > Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> >
> > Oops,
> >
> > Acked-by: Tejun Heo <tj@xxxxxxxxxx>
>
> Since you pushed the original commit, mind pushing this fix to Linus too?

I see Linus applied it out of email, so never mind.

Thanks,

Ingo
--
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/