netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2][ATM]: Bad locking on br2684_devs modifications.
@ 2008-05-04  7:39 Pavel Emelyanov
  2008-05-05  1:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Emelyanov @ 2008-05-04  7:39 UTC (permalink / raw)
  To: Chas Williams, Linux Netdev List

The list_del happens under read-locked devs_lock.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---
 net/atm/br2684.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 3a74ff8..13858e2 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -346,9 +346,9 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
 		/* skb==NULL means VCC is being destroyed */
 		br2684_close_vcc(brvcc);
 		if (list_empty(&brdev->brvccs)) {
-			read_lock(&devs_lock);
+			write_lock_irq(&devs_lock);
 			list_del(&brdev->br2684_devs);
-			read_unlock(&devs_lock);
+			write_unlock_irq(&devs_lock);
 			unregister_netdev(net_dev);
 		}
 		return;
-- 
1.5.3.4


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

* Re: [PATCH 2/2][ATM]: Bad locking on br2684_devs modifications.
  2008-05-04  7:39 [PATCH 2/2][ATM]: Bad locking on br2684_devs modifications Pavel Emelyanov
@ 2008-05-05  1:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-05-05  1:00 UTC (permalink / raw)
  To: xemul; +Cc: chas, netdev

From: Pavel Emelyanov <xemul@openvz.org>
Date: Sun, 04 May 2008 11:39:00 +0400

> The list_del happens under read-locked devs_lock.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied, thanks a lot.

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

end of thread, other threads:[~2008-05-05  1:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04  7:39 [PATCH 2/2][ATM]: Bad locking on br2684_devs modifications Pavel Emelyanov
2008-05-05  1:00 ` 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).