* [PATCH] dev_change_name: ignore changes to same name
@ 2007-10-24 13:44 Stephen Hemminger
2007-10-26 10:53 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2007-10-24 13:44 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
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 <shemminger@linux-foundation.org>
--- a/net/core/dev.c 2007-10-24 06:01:31.000000000 -0700
+++ b/net/core/dev.c 2007-10-24 06:41:18.000000000 -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, '%')) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dev_change_name: ignore changes to same name
2007-10-24 13:44 [PATCH] dev_change_name: ignore changes to same name Stephen Hemminger
@ 2007-10-26 10:53 ` David Miller
2007-10-26 17:51 ` Rick Jones
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2007-10-26 10:53 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@linux-foundation.org>
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 <shemminger@linux-foundation.org>
Fair enough, applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dev_change_name: ignore changes to same name
2007-10-26 10:53 ` David Miller
@ 2007-10-26 17:51 ` Rick Jones
0 siblings, 0 replies; 3+ messages in thread
From: Rick Jones @ 2007-10-26 17:51 UTC (permalink / raw)
To: David Miller; +Cc: shemminger, netdev
David Miller wrote:
> From: Stephen Hemminger <shemminger@linux-foundation.org>
> 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 <shemminger@linux-foundation.org>
>
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-26 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 13:44 [PATCH] dev_change_name: ignore changes to same name Stephen Hemminger
2007-10-26 10:53 ` David Miller
2007-10-26 17:51 ` Rick Jones
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).