Skip to contentSkip to conversation

: Bad locking on br2684_devs modifications.

PATCH Applied Pavel Emelyanov 2 participants 2 messages May 4, 2008 – May 5, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 : Bad locking on br2684_devs modifications.

The list_del happens under read-locked devs_lock.

---
 net/atm/br2684.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/atm/br2684.c +2 -2
index 3a74ff8..13858e2 100644
@@ -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;
Signature · 1 line
1.5.3.4