dev_change_name: ignore changes to same name
Subsystems (2)
PATCH 1/1 dev_change_name: ignore changes to same name
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.
net/core/dev.c +3 -0
@@ -885,6 +885,9 @@ int dev_change_name(struct net_device *dif (!dev_valid_name (newname))return -EINVAL ; +if (strncmp (newname, dev->name,IFNAMSIZ ) ==0 ) +return 0 ; +memcpy (oldname, dev->name,IFNAMSIZ );if (strchr (newname,'%' )) {
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Wed, 24 Oct 2007 06:44:45 -0700
Quoted 5 lines
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.
Quoted 4 lines · David Miller
From: Stephen Hemminger <[email protected]>
Date: Wed, 24 Oct 2007 06:44:45 -0700
Quoted 8 lines
Quoted 5 lines
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