netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv4: Only destroy inet devices when we receive an NETDEV_UNREGISTER event
@ 2007-06-22  6:42 Eric W. Biederman
  2007-06-22  9:07 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Eric W. Biederman @ 2007-06-22  6:42 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Currently we destroy inet devices when we remove the last interface
from an inet device, and during NETDEV_UNREGISTER.  We only create
them during NETDEV_REGISTER event.  The result is if you and an ipv4
address to a device delete it (so the device has no ipv4 addresses)
and attampt to add any ipv4 address to that device you will receive 
an -ENOBUFS error.

To correct the problem this patch simply deletes the excess inet
device destroy.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/ipv4/devinet.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index fa97b96..abf6352 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -327,12 +327,8 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
 		}
 
 	}
-	if (destroy) {
+	if (destroy)
 		inet_free_ifa(ifa1);
-
-		if (!in_dev->ifa_list)
-			inetdev_destroy(in_dev);
-	}
 }
 
 static void inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
-- 
1.5.1.1.181.g2de0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipv4: Only destroy inet devices when we receive an NETDEV_UNREGISTER event
  2007-06-22  6:42 [PATCH] ipv4: Only destroy inet devices when we receive an NETDEV_UNREGISTER event Eric W. Biederman
@ 2007-06-22  9:07 ` Eric W. Biederman
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2007-06-22  9:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Never mind.  I saw this and I thought it was an old obscure bug.
But it appears it is a new condition, that has already been
fixed.

Eric



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-22  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-22  6:42 [PATCH] ipv4: Only destroy inet devices when we receive an NETDEV_UNREGISTER event Eric W. Biederman
2007-06-22  9:07 ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).