Re: Dealing with the NMI mess
From: Peter Zijlstra
Date: Fri Jul 24 2015 - 16:51:29 EST
On Fri, Jul 24, 2015 at 01:22:11PM -0700, Linus Torvalds wrote:
> On Fri, Jul 24, 2015 at 12:55 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> >
> > I worry that we'll end up running the do_debug() handlers from effective
> > NMI context.
> >
> > The NMI might have preempted locks which these handlers require etc..
>
> If #DB takes any locks like that, then #DB is broken.
>
> Pretty much by definition, a data breakpoint can happen on pretty much
> absolutely any code. This is in no way NMI-specific as far as I can
> tell.
>
> Do we really take locks in the #DB handler?
do_debug()
send_sigtrap()
force_sig_info()
spin_lock_irqsave()
Now, I don't pretend to understand the condition before send_sigtrap(),
so it _might_ be ok, but it sure as heck could do with a comment.
--
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/