Re: [PATCH] x86 MCE: shut up lockdep warning

From: Ingo Molnar
Date: Fri May 08 2009 - 05:10:48 EST



* Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:

> On Fri, May 08, 2009 at 11:47:09AM +0800, Shaohua Li wrote:
> > lockdep report below warning when I try to offline one cpu:
> > [ 110.835487] =================================
> > [ 110.835616] [ INFO: inconsistent lock state ]
> > [ 110.835688] 2.6.30-rc4-00336-g8c9ed89 #52
> > [ 110.835757] ---------------------------------
> > [ 110.835828] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
> > [ 110.835908] swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
> > [ 110.835982] (cmci_discover_lock){?.+...}, at: [<ffffffff80236dc0>] cmci_clear+0x30/0x9b
> >
> > smp_call_function_single() will disable interrupt. moving mce reenable/disable
> > to workqueue, so no irq is disabled.
>
> Looks good. Thanks.
>
> Acked-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

The report is useful, but the fix does not look good at all, and you
should never have acked it:

- it works around a lockdep warning

- you did not realize the real bug while the warning was plain

- plus the patch introduces a fragile (because complex)
work_on_cpu() call into the CPU hotplug path, which could have
caused followup regressions.

Please also Cc: the relevant upstream subsystem maintainers in such
cases (the x86 maintaiers in this case).

Thanks,

Ingo
--
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/