[PATCH] (3/7) ipmr.c - drop/reacquire in error path.

DORMANTno replies

From: Stephen Hemminger <hidden>
Date: 2003-06-25 18:41:17

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;
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help