From: Vladimir Oltean <[email protected]> Date: Wed, 27 May 2020 21:08:05 +0300
> From: Vladimir Oltean <[email protected]> > > Be there a platform with the following layout: > > Regular NIC > | > +----> DSA master for switch port > | > +----> DSA master for another switch port > > After changing DSA back to static lockdep class keys in commit > 1a33e10e4a95 ("net: partially revert dynamic lockdep key changes"), this > kernel splat can be seen: > > [ 13.361198] ============================================ > [ 13.366524] WARNING: possible recursive locking detected > [ 13.371851] 5.7.0-rc4-02121-gc32a05ecd7af-dirty #988 Not tainted > [ 13.377874] -------------------------------------------- > [ 13.383201] swapper/0/0 is trying to acquire lock: > [ 13.388004] ffff0000668ff298 > (&dsa_slave_netdev_xmit_lock_key){+.-.}-{2:2}, at: > __dev_queue_xmit+0x84c/0xbe0 > [ 13.397879] > [ 13.397879] but task is already holding lock: > [ 13.403727] ffff0000661a1698 > (&dsa_slave_netdev_xmit_lock_key){+.-.}-{2:2}, at: > __dev_queue_xmit+0x84c/0xbe0 ... > There appears to be no negative side-effect to declaring lockless TX for > the DSA virtual interfaces, which means they handle their own locking. > So that's what we do to make the splat go away. > > Patch tested in a wide variety of cases: unicast, multicast, PTP, etc. > > Fixes: ab92d68fc22f ("net: core: add generic lockdep keys") > Suggested-by: Taehee Yoo <[email protected]> > Signed-off-by: Vladimir Oltean <[email protected]> > Reviewed-by: Florian Fainelli <[email protected]> Applied, thanks.
