On Jul 2, 2014, at 10:45 AM, Chuck Lever <[email protected]> wrote:

> Hi Jack-
> 
> 
> On Jul 2, 2014, at 3:19 AM, Jack Morgenstein <[email protected]> wrote:
> 
>> On Tue, 1 Jul 2014 18:17:27 -0400
>> Chuck Lever <[email protected]> wrote:
>> 
>>> Hi-
>>> 
>>> This happens during boot, and means that lockdep and lock_stat are
>>> completely disabled during any testing I do.
>>> 
>>> Does this splat have a known fix, or should I file an upstream
>>> bugzilla?
>>> 
>>> 
>>> Jul  1 15:50:22 manet kernel: =================================
>>> Jul  1 15:50:22 manet kernel: [ INFO: inconsistent lock state ]
>>> Jul  1 15:50:22 manet kernel: 3.16.0-rc2-00024-g2e78883 #17 Tainted:
>>> G            E Jul  1 15:50:22 manet kernel:
>>> --------------------------------- Jul  1 15:50:22 manet kernel:
>>> inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. Jul  1 15:50:22
>>> manet kernel: swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes: Jul  1
>>> 15:50:22 manet kernel: (&(&iboe->lock)->rlock){+.?...}, at:
>>> [<ffffffffa065f68b>] mlx4_ib_addr_event+0xdb/0x1a0 [mlx4_ib] Jul  1
>>> 15:50:22 manet kernel: {SOFTIRQ-ON-W} state was registered at: Jul  1
>>> 15:50:22 manet kernel:  [<ffffffff810b3110>]
>>> mark_irqflags+0x110/0x170 Jul  1 15:50:22 manet kernel:
>>> [<ffffffff810b4806>] __lock_acquire+0x2c6/0x5b0 Jul  1 15:50:22 manet
>>> kernel:  [<ffffffff810b4bd9>] lock_acquire+0xe9/0x120 Jul  1 15:50:22
>>> manet kernel:  [<ffffffff815f7f6e>] _raw_spin_lock+0x3e/0x80 Jul  1
>>> 15:50:22 manet kernel:  [<ffffffffa0661084>]
>>> mlx4_ib_scan_netdevs+0x34/0x260 [mlx4_ib] Jul  1 15:50:22 manet
>>> kernel:  [<ffffffffa06612db>] mlx4_ib_netdev_event+0x2b/0x40
>>> [mlx4_ib] Jul  1 15:50:22 manet kernel:  [<ffffffff81522219>]
>>> register_netdevice_notifier+0x99/0x1e0 Jul  1 15:50:22 manet kernel:
>>> [<ffffffffa06626e3>] mlx4_ib_add+0x743/0xbc0 [mlx4_ib]
>> 
>> Hi Chuck,
>> 
>> There is a known fix which I need to submit.
>> The fix is to use lock/unlock_bh instead of spin_lock/unlock.
>> 
>> The netdev event notifier callback (mlx4_ib_addr_event), which also
>> uses the lock, is called from a soft-interrupt context, so turning off
>> hard interrupts is not needed here.  _bh spinlocks are sufficient.
> 
> If you have a patch handy, I'm happy to test. Thanks!

I built my own according to your description. The fix seems good.

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to