Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
evl/net: skb: fix inconsistent locking of recycling queue
Interrupts on/off mismatch when locking the recycling queue. At this chance annotate some routines wrt the legit call context. [ 39.474194] ================================ [ 39.474195] WARNING: inconsistent lock state [ 39.474197] 6.1.54+ torvalds#66 Not tainted [ 39.474200] -------------------------------- [ 39.474201] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. [ 39.474203] eth0.rx/370 [HC1[0]:SC0[0]:HE0:SE1] takes: [ 39.474207] ffffffff8276b8d8 (recycling_lock){?.+.}-{0:0}, at: free_skb_inband+0x5/0xa0 [ 39.474222] {HARDIRQ-ON-W} state was registered at: [ 39.474223] __lock_acquire+0x363/0x9a0 [ 39.474229] lock_acquire+0xbe/0x2a0 [ 39.474233] free_skb_inband+0x2a/0xa0 [ 39.474236] evl_net_free_skb+0x11/0x90 [ 39.474239] evl_net_do_rx+0x1b7/0x280 [ 39.474242] kthread_trampoline+0x1c7/0x2d0 [ 39.474246] kthread+0xf5/0x120 [ 39.474251] ret_from_fork+0x22/0x30 [ 39.474255] irq event stamp: 24 [ 39.474256] hardirqs last enabled at (23): [<ffffffff81b06125>] _raw_spin_unlock_irqrestore+0x65/0x80 [ 39.474262] hardirqs last disabled at (24): [<ffffffff81afb971>] __schedule+0x3a1/0x770 [ 39.474266] softirqs last enabled at (0): [<ffffffff810c1ad6>] copy_process+0x796/0x18c0 [ 39.474271] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 39.474274] [ 39.474274] other info that might help us debug this: [ 39.474275] Possible unsafe locking scenario: [ 39.474275] [ 39.474276] CPU0 [ 39.474276] ---- [ 39.474277] lock(recycling_lock); [ 39.474278] <Interrupt> [ 39.474279] lock(recycling_lock); [ 39.474280] [ 39.474280] *** DEADLOCK *** Signed-off-by: Philippe Gerum <rpm@xenomai.org>
- Loading branch information