In the failure path, need to drop/re-acquire locking to allow sysfs and hotplug
to run.
diff -Nru a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
--- a/net/ipv4/ipmr.c Wed Jun 25 11:15:05 2003
+++ b/net/ipv4/ipmr.c Wed Jun 25 11:15:05 2003
@@ -158,6 +158,10 @@
return dev;
failure:
+ /* allow the register to be completed before unregistering. */
+ rtnl_unlock();
+ rtnl_lock();
+
unregister_netdevice(dev);
return NULL;
}
@@ -228,6 +232,10 @@
return dev;
failure:
+ /* allow the register to be completed before unregistering. */
+ rtnl_unlock();
+ rtnl_lock();
+
unregister_netdevice(dev);
return NULL;
}