| To: | "David S. Miller" <davem@xxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] (3/7) ipmr.c - drop/reacquire in error path. |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Wed, 25 Jun 2003 11:41:17 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| Organization: | Open Source Development Lab |
| Sender: | netdev-bounce@xxxxxxxxxxx |
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;
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] (2/7) ipmr.c - make local stuff static, Stephen Hemminger |
|---|---|
| Next by Date: | [PATCH] (4/7) ipmr.c - convert to alloc_netdev, Stephen Hemminger |
| Previous by Thread: | [PATCH] (2/7) ipmr.c - make local stuff static, Stephen Hemminger |
| Next by Thread: | [PATCH] (4/7) ipmr.c - convert to alloc_netdev, Stephen Hemminger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |