[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1371926797.18733.155.camel@gandalf.local.home>
Date: Sat, 22 Jun 2013 14:46:37 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Seiji Aguchi <seiji.aguchi@....com>
Cc: LKML <linux-kernel@...r.kernel.org>,
"H. Peter Anvin" <hpa@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH][GIT PULL] trace,x86: Move creation of irq tracepoints
from apic.c to irq.c
On Sat, 2013-06-22 at 17:42 +0000, Seiji Aguchi wrote:
> > +static inline void load_current_idt(void)
> > +{
> > + unsigned long flags;
> > +
> > + local_irq_save(flags);
> > + if (is_debug_idt_enabled())
> > + load_debug_idt();
> > + else
> > + load_idt((const struct desc_ptr *)&idt_descr);
> > + local_irq_restore(flags);
> > +}
> >
> > It's not safe to call local_irq_save() here. From entry_64.S:
> >
> > .macro TRACE_IRQS_OFF_DEBUG
> > call debug_stack_set_zero
> > TRACE_IRQS_OFF
> > call debug_stack_reset
> > .endm
> >
> > We must change the idt before we can trace irqs being disabled. The
> > local_irq_save() here is going to be traced by lockdep. Why do we need
> > to disable interrupts? It's pretty pointless since this same code can be
> > called by NMIs.
>
> OK, I agree to remove the local_irq_save().
>
> I thought it is safe to disable interrupt to avoid potential races,
> because the load_current_id() is a common function and someone else may use it near future.
It should not be that common of a function. Not many should use it.
I'm testing a patch now and should post it in a few hours.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists