netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: cassini: use nested lock annotation
@ 2014-05-08 23:07 Emil Goode
  2014-05-09 20:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Emil Goode @ 2014-05-08 23:07 UTC (permalink / raw)
  To: David S. Miller, Jingoo Han, Jeff Kirsher, Ben Hutchings,
	Arend van Spriel, Joe Perches
  Cc: netdev, linux-kernel, kernel-janitors, Emil Goode

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>
---
 drivers/net/ethernet/sun/cassini.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index df8d383..b9ac20f 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -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)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: cassini: use nested lock annotation
  2014-05-08 23:07 [PATCH] net: cassini: use nested lock annotation Emil Goode
@ 2014-05-09 20:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-05-09 20:34 UTC (permalink / raw)
  To: emilgoode
  Cc: jg1.han, jeffrey.t.kirsher, ben, arend, joe, netdev, linux-kernel,
	kernel-janitors

From: Emil Goode <emilgoode@gmail.com>
Date: Fri,  9 May 2014 01:07:17 +0200

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-09 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-08 23:07 [PATCH] net: cassini: use nested lock annotation Emil Goode
2014-05-09 20:34 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).