From: Pavel Emelyanov Date: Mon, 5 May 2008 01:00:36 +0000 (-0700) Subject: atm: Bad locking on br2684_devs modifications. X-Git-Tag: v2.6.26-rc2~60^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e0ba0060ffcee2e766ec3159196235b1a2a0ff3;p=linux-2.6 atm: Bad locking on br2684_devs modifications. The list_del happens under read-locked devs_lock. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller --- diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 3a74ff8ca4..13858e2675 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;