Re: [PATCH] dev_change_name: ignore changes to same name

2007-10-26 Thread Rick Jones

David Miller wrote:

From: Stephen Hemminger <[EMAIL PROTECTED]>
Date: Wed, 24 Oct 2007 06:44:45 -0700



Prevent error/backtrace from dev_rename() when changing
name of network device to the same name. This is a common
situation with udev and other scripts that bind addr to device.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>



Fair enough, applied.


Very timely!  I'd just built/booted a 2.6.24-rc1 kernel yesterday and it spent 
quite a  long time with stack traces (I have 16 interfaces on the system and a 
9600 baud console...I can only imagine what it would have been like on a big 
system...).  With the patch applied to that tree, it is now down to only three 
or so stack traces related to renames that were not there on 2.6.23.mumble.  Not 
sure if that warrants an acked-by but feel free if it makes sense.  (I'm still 
really fuzzy on those, even after reading SubmittingPatches)


rick jones
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] dev_change_name: ignore changes to same name

2007-10-26 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]>
Date: Wed, 24 Oct 2007 06:44:45 -0700

> Prevent error/backtrace from dev_rename() when changing
> name of network device to the same name. This is a common
> situation with udev and other scripts that bind addr to device.
> 
> Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

Fair enough, applied.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] dev_change_name: ignore changes to same name

2007-10-24 Thread Stephen Hemminger
Prevent error/backtrace from dev_rename() when changing
name of network device to the same name. This is a common
situation with udev and other scripts that bind addr to device.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- a/net/core/dev.c2007-10-24 06:01:31.0 -0700
+++ b/net/core/dev.c2007-10-24 06:41:18.0 -0700
@@ -885,6 +885,9 @@ int dev_change_name(struct net_device *d
if (!dev_valid_name(newname))
return -EINVAL;
 
+   if (strncmp(newname, dev->name, IFNAMSIZ) == 0)
+   return 0;
+
memcpy(oldname, dev->name, IFNAMSIZ);
 
if (strchr(newname, '%')) {
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html