patch-2.3.4 linux/drivers/net/lapbether.c

Next file: linux/drivers/net/net_init.c
Previous file: linux/drivers/net/irda/w83977af_ir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.3/linux/drivers/net/lapbether.c linux/drivers/net/lapbether.c
@@ -533,10 +533,15 @@
 
 	printk(KERN_INFO "LAPB Ethernet driver version 0.01\n");
 
+	read_lock_bh(&dev_base_lock);
 	for (dev = dev_base; dev != NULL; dev = dev->next) {
-		if (dev_is_ethdev(dev))
+		if (dev_is_ethdev(dev)) {
+			read_unlock_bh(&dev_base_lock);
 			lapbeth_new_device(dev);
+			read_lock_bh(&dev_base_lock);
+		}
 	}
+	read_unlock_bh(&dev_base_lock);
 
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)