]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] net: Ignore sysfs network device rename bugs.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 3 Apr 2007 06:07:30 +0000 (00:07 -0600)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 4 Apr 2007 15:51:52 +0000 (08:51 -0700)
commit1e4f6c9e263a3326ecb1bb73b38b51b758192fb7
tree931132501440298e6be39c3e218f6016ca9b6558
parent143ea1c72a1d5fb2e2637164179c7c0d095380c6
[PATCH] net: Ignore sysfs network device rename bugs.

The generic networking code ensures that no two networking devices
have the same name, so  there is no time except when sysfs has
implementation bugs that device_rename when called from
dev_change_name will fail.

The current error handling for errors from device_rename in
dev_change_name is wrong and results in an unusable and unrecoverable
network device if device_rename is happens to return an error.

This patch removes the buggy error handling.  Which confines the mess
when device_rename hits a problem to sysfs, instead of propagating it
the rest of the network stack.  Making linux a little more robust.

Without this patch you can observe what happens when sysfs has a bug
when CONFIG_SYSFS_DEPRECATED is not set and you attempt to rename
a real network device to a name like (broken_parity_status, device,
modalias, power, resource2, subsystem_vendor, class,  driver, irq,
msi_bus, resource, subsystem, uevent, config, enable, local_cpus,
numa_node, resource0, subsystem_device, vendor)

Greg has a patch that fixes the sysfs bugs but he doesn't trust it
for a 2.6.21 timeframe.  This patch which just ignores errors should
be safe and it keeps the system from going completely wacky.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/core/dev.c