Skip to content

Commit

Permalink
net: cassini: use nested lock annotation
Browse files Browse the repository at this point in the history
In the cas_lock_tx function we acquire multiple locks in a loop and
need to use nested lock annotation to prevent lockdep warnings.

Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Emil Goode authored and David S. Miller committed May 9, 2014
1 parent de68294 commit a9de050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sun/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a9de050

Please sign in to comment.