Re: Oops caused by race between livepatch and ftrace
From: Steven Rostedt
Date: Tue May 21 2019 - 10:44:41 EST
On Tue, 21 May 2019 09:16:29 -0500
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> > Hmm, this may blow up with lockdep, as I believe we already have a
> > locking dependency of:
> >
> > text_mutex -> ftrace_lock
> >
> > And this will reverses it. (kprobes appears to take the locks in this
> > order).
> >
> > Perhaps have live kernel patching grab ftrace_lock?
>
> Where does kprobes call into ftrace with the text_mutex? I couldn't
> find it.
Hmm, maybe it doesn't. I was looking at the arm_kprobe_ftrace() but
it doesn't call it with text_mutex().
Maybe it is fine, but we had better perform a lot of testing with
lockdep on to make sure.
-- Steve