Re: qlogic lockdep warning

From: Xiaotian Feng
Date: Thu Jan 21 2010 - 03:47:12 EST


qla24xx_msix_default is using spin_lock_irq and spin_unlock_irq within
the irq handler...
I think convert to spin_lock_irqsave/spin_unlock_irqrestore can solve
this warning.

On Thu, Jan 21, 2010 at 4:22 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Wed, 2010-01-20 at 17:10 -0800, Yinghai Lu wrote:
>
>> [ Â 77.962879] ------------[ cut here ]------------
>> [ Â 77.965784] WARNING: at kernel/lockdep.c:2332
>> trace_hardirqs_on_caller+0xc6/0x14b()
>> [ Â 77.977492] Hardware name: Sun
>> [ Â 77.979485] Modules linked in:
>> [ Â 77.994337] Pid: 0, comm: swapper Not tainted
>> 2.6.33-rc4-tip-yh-03949-g3a8e3f5-dirty #64
>> [ Â 78.000120] Call Trace:
>> [ Â 78.013298] Â<IRQ> Â[<ffffffff81076b54>] warn_slowpath_common+0x7c/0x94
>> [ Â 78.017746] Â[<ffffffff81cd712c>] ? _raw_spin_unlock_irq+0x30/0x36
>> [ Â 78.035171] Â[<ffffffff81076b80>] warn_slowpath_null+0x14/0x16
>> [ Â 78.040152] Â[<ffffffff810a2ae8>] trace_hardirqs_on_caller+0xc6/0x14b
>> [ Â 78.055400] Â[<ffffffff810a2b7a>] trace_hardirqs_on+0xd/0xf
>> [ Â 78.058951] Â[<ffffffff81cd712c>] _raw_spin_unlock_irq+0x30/0x36
>> [ Â 78.074889] Â[<ffffffff816461ef>] qla24xx_msix_default+0x243/0x281
>> [ Â 78.091598] Â[<ffffffff810a5752>] ? __lock_release+0xa5/0xae
>> [ Â 78.096799] Â[<ffffffff810c02ae>] handle_IRQ_event+0x53/0x113
>> [ Â 78.111568] Â[<ffffffff810c2061>] handle_edge_irq+0xf3/0x13b
>> [ Â 78.116255] Â[<ffffffff81035109>] handle_irq+0x24/0x2f
>> [ Â 78.132063] Â[<ffffffff81cdc4b4>] do_IRQ+0x5c/0xc3
>> [ Â 78.134684] Â[<ffffffff81cd7393>] ret_from_intr+0x0/0xf
>> [ Â 78.137903] Â<EOI> Â[<ffffffff81039a56>] ? mwait_idle+0xaf/0xbb
>> [ Â 78.155674] Â[<ffffffff81039a4d>] ? mwait_idle+0xa6/0xbb
>> [ Â 78.158600] Â[<ffffffff81031c7c>] cpu_idle+0x61/0xa1
>> [ Â 78.174333] Â[<ffffffff81c85d7a>] rest_init+0x7e/0x80
>> [ Â 78.178122] Â[<ffffffff82832d1f>] start_kernel+0x316/0x31d
>> [ Â 78.193623] Â[<ffffffff82832297>] x86_64_start_reservations+0xa7/0xab
>> [ Â 78.198924] Â[<ffffffff8283237f>] x86_64_start_kernel+0xe4/0xeb
>> [ Â 78.214540] ---[ end trace be4529f30a2e4ef5 ]---
>
> It appears the thing tries to enable IRQs from within an IRQ handler,
> naughty.
>
> --
> 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/
>
--
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/