[...]
[...]
Yes, this does seem to be the case.
Perhaps Peter or Ingo can come up with some ideas on how to solve this.
Let me try to rephrase the problem.
In __local_bh_disable() we call add_preempt_count(SOFTIRQ_OFFSET)
in add_preempt_count (in sched.c)
preempt_count() += val;
if (preempt_count() == val)
trace_preempt_off(...)
in trace_preempt_off we record into the ring buffer. But the ring buffer
will call spin_lock_irqsave (it use to be raw_spin_lock, where this was
not an issue). Note, there is development to make the ring buffer
lockless, but until that time, we need to come up with a real solution.
Now we enter the lockdep code, but we are not in a full state transition
and we get a WARN_ON triggered by the lockdep code (have SOFTIRQ_OFFSET
set but we did not yet tell lockdep we are in a softirq).
This is the type of problems we deal with when we have the tracer tracing
lockdep code at the same time the lockdep code is checking the tracer.
-- Steve
--