Re: [PATCH v0] softirq: Call trace_preempt_on manually to prevent lockdep splatter

From: Thomas Gleixner
Date: Tue Jun 02 2015 - 15:38:13 EST


On Thu, 28 May 2015, Daniel Wagner wrote:

> __do_softirq() uses __local_bh_disable_ip(SOFTIRQ_OFFSET) to disable
> SOFTIRQs and signaling that softirqs are served.
>
> When done, __do_softirq() calls __local_bh_enable(SOFTIRQ_OFFSET)
> to enable them again. The reason it does not call
> __local_bh_enable_ip(SOFTIRQ_OFFSET) is because __local_bh_enable_ip()
> would process still-pending softirqs.
>
> Now, we face the same problem as in __local_bh_disable_ip()
> with the preempt tracer hooking into preempt_count_sub(). This
> will case lockdep warning, when for example the kernel is configured
> to run all IRQs as threads and preemptoff tracer is activated:

....

> Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>

Acked-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
--
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/