]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
atm: Bad locking on br2684_devs modifications.
authorPavel Emelyanov <xemul@openvz.org>
Mon, 5 May 2008 01:00:36 +0000 (18:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 May 2008 01:00:36 +0000 (18:00 -0700)
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>
net/atm/br2684.c

index 3a74ff8ca45dd0198ff72be2353b054d7c7a86a1..13858e2675c5f57277f031eacece09724bc84cd3 100644 (file)
@@ -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;