patch-2.3.16 linux/drivers/net/net_init.c
Next file: linux/drivers/net/olympic.c
Previous file: linux/drivers/net/ne2k-pci.c
Back to the patch index
Back to the overall index
- Lines: 65
- Date:
Tue Aug 31 11:23:03 1999
- Orig file:
v2.3.15/linux/drivers/net/net_init.c
- Orig date:
Thu Aug 26 13:05:38 1999
diff -u --recursive --new-file v2.3.15/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
@@ -135,9 +135,11 @@
ether_setup(dev); /* Hmmm, should this be called here? */
- if (new_device)
+ if (new_device) {
+ rtnl_lock();
register_netdevice(dev);
-
+ rtnl_unlock();
+ }
return dev;
}
@@ -259,9 +261,11 @@
hippi_setup(dev);
- if (new_device)
+ if (new_device) {
+ rtnl_lock();
register_netdevice(dev);
-
+ rtnl_unlock();
+ }
return dev;
}
@@ -601,9 +605,11 @@
/* New-style flags. */
dev->flags = IFF_BROADCAST;
- if (new_device)
+ if (new_device) {
+ rtnl_lock();
register_netdevice(dev);
-
+ rtnl_unlock();
+ }
return dev;
}
@@ -744,9 +750,11 @@
}
fc_setup(dev);
- if (new_device)
+ if (new_device) {
+ rtnl_lock();
register_netdevice(dev);
-
+ rtnl_unlock();
+ }
return dev;
}
@@ -775,7 +783,7 @@
void unregister_fcdev(struct net_device *dev)
{
rtnl_lock();
- unregister_netdevice(dev);
+ unregister_netdevice(dev);
rtnl_unlock();
fc_freedev(dev);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)