Re: [PATCH v11 3/3] tracing: Centralize preemptirq tracepoints and unify their usage
From: Joel Fernandes
Date: Mon Jul 30 2018 - 15:19:00 EST
On Mon, Jul 30, 2018 at 10:58:13AM +0200, Peter Zijlstra wrote:
> On Thu, Jul 26, 2018 at 04:50:44PM -0700, Joel Fernandes wrote:
> > One note, I have to check for lockdep recursion in the code that calls
> > the trace events API and bail out if we're in lockdep recursion
> > protection to prevent something like the following case: a spin_lock is
> > taken. Then lockdep_acquired is called. That does a raw_local_irq_save
> > and then sets lockdep_recursion, and then calls __lockdep_acquired. In
> > this function, a call to get_lock_stats happens which calls
> > preempt_disable, which calls trace IRQS off somewhere which enters my
> > tracepoint code and sets the tracing_irq_cpu flag to prevent recursion.
> > This flag is then never cleared causing lockdep paths to never be
> > entered and thus causing splats and other bad things.
>
> That is now fixed, right?
Yes, that's right it got fixed from v9->v10 but I forgot to update the
changelog, I'll make the change and resend. Thanks!
thanks,
- Joel