]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: remove redundant netdev_lock_ops() from conduit ethtool ops
authorStanislav Fomichev <sdf.kernel@gmail.com>
Tue, 14 Apr 2026 23:10:35 +0000 (16:10 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 17 Apr 2026 02:10:48 +0000 (19:10 -0700)
commit0f99e0c3e19badaf3fdced0d3feba623e59eed41
tree941c7daccd11a1e763de45fdbcc69a2fb57e020d
parent105425b1969c5affe532713cfac1c0b320d7ac2b
net: dsa: remove redundant netdev_lock_ops() from conduit ethtool ops

DSA replaces the conduit (master) device's ethtool_ops with its own
wrappers that aggregate stats from both the conduit and DSA switch
ports. Taking the lock again inside the DSA wrappers causes a deadlock.

Stumbled upon this when booting qemu with fbnic and CONFIG_NET_DSA_LOOP=y
(which looks like some kind of testing device that auto-populates the ports
of eth0). `ethtool -i` is enough to deadlock. This means we have basically zero
coverage for DSA stuff with real ops locked devs.

Remove the redundant netdev_lock_ops()/netdev_unlock_ops() calls from
the DSA conduit ethtool wrappers.

Fixes: 2bcf4772e45a ("net: ethtool: try to protect all callback with netdev instance lock")
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260414231035.1917035-1-sdf@fomichev.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/conduit.c