summaryrefslogtreecommitdiffstats
path: root/net/atm/br2684.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-05-04 18:00:36 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-04 18:00:36 -0700
commit1e0ba0060ffcee2e766ec3159196235b1a2a0ff3 (patch)
tree7678778bf09f9822db4541497efd9cd6b4fd571f /net/atm/br2684.c
parent65e4113684e50cee75357ce10dc9026b0929e4e9 (diff)
downloadop-kernel-dev-1e0ba0060ffcee2e766ec3159196235b1a2a0ff3.zip
op-kernel-dev-1e0ba0060ffcee2e766ec3159196235b1a2a0ff3.tar.gz
atm: Bad locking on br2684_devs modifications.
The list_del happens under read-locked devs_lock. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/br2684.c')
-rw-r--r--net/atm/br2684.c4
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;
OpenPOWER on IntegriCloud