Skip to content

Commit

Permalink
atm: Bad locking on br2684_devs modifications.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed May 5, 2008
1 parent 65e4113 commit 1e0ba00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/atm/br2684.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1e0ba00

Please sign in to comment.