[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <481D6814.6050801@openvz.org>
Date: Sun, 04 May 2008 11:39:00 +0400
From: Pavel Emelyanov <xemul@...nvz.org>
To: Chas Williams <chas@....nrl.navy.mil>,
Linux Netdev List <netdev@...r.kernel.org>
Subject: [PATCH 2/2][ATM]: Bad locking on br2684_devs modifications.
The list_del happens under read-locked devs_lock.
Signed-off-by: Pavel Emelyanov <xemul@...nvz.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists