patch-2.3.4 linux/net/ethernet/eth.c

Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/decnet/sysctl_net_decnet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.3/linux/net/ethernet/eth.c linux/net/ethernet/eth.c
@@ -63,10 +63,12 @@
 
 __initfunc(void eth_setup(char *str, int *ints))
 {
-	struct device *d = dev_base;
+	struct device *d;
 
 	if (!str || !*str)
 		return;
+	read_lock_bh(&dev_base_lock);
+	d = dev_base;
 	while (d) 
 	{
 		if (!strcmp(str,d->name)) 
@@ -83,6 +85,7 @@
 		}
 		d=d->next;
 	}
+	read_unlock_bh(&dev_base_lock);
 }
 
 

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