Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dsa: qca8k: Use nested lock to avoid splat

qca8k_phy_eth_command() is used to probe the child MDIO bus while the
parent MDIO is locked. This causes lockdep splat, reporting a possible
deadlock. It is not an actually deadlock, because different locks are
used. By making use of mutex_lock_nested() we can avoid this false
positive.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241110175955.3053664-1-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Andrew Lunn and committed by
Jakub Kicinski
078e0d59 b169e76e

+1 -1
+1 -1
drivers/net/dsa/qca/qca8k-8xxx.c
··· 673 673 * We therefore need to lock the MDIO bus onto which the switch is 674 674 * connected. 675 675 */ 676 - mutex_lock(&priv->bus->mdio_lock); 676 + mutex_lock_nested(&priv->bus->mdio_lock, MDIO_MUTEX_NESTED); 677 677 678 678 /* Actually start the request: 679 679 * 1. Send mdio master packet