Re: [PATCH v11 3/3] tracing: Centralize preemptirq tracepoints and unify their usage
From: Peter Zijlstra
Date: Mon Jul 30 2018 - 04:58:32 EST
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?