Skip to contentSkip to conversation

net: cassini: use nested lock annotation

PATCH Applied Emil Goode 2 participants 2 messages May 8, 2014 – May 9, 2014

Subsystems (3)
lore
Share & tools
lore

Emil Goode

author
#0 lore raw

PATCH 1/1 net: cassini: use nested lock annotation

In the cas_lock_tx function we acquire multiple locks in a loop and need to use nested lock annotation to prevent lockdep warnings.

---
 drivers/net/ethernet/sun/cassini.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sun/cassini.c +1 -1
index df8d383..b9ac20f 100644
@@ -246,7 +246,7 @@ static inline void cas_lock_tx(struct cas *cp)
 	int i;
 
 	for (i = 0; i < N_TX_RINGS; i++)
-		spin_lock(&cp->tx_lock[i]);
+		spin_lock_nested(&cp->tx_lock[i], i);
 }
 
 static inline void cas_lock_all(struct cas *cp)
Signature · 1 line
1.7.10.4