lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 20 Oct 2009 19:54:02 +0100 From: Nix <nix@...eri.org.uk> To: Matt Mackall <mpm@...enic.com> Cc: linux-kernel@...r.kernel.org, linux-net@...r.kernel.org Subject: [PATCH] Allow renaming of network interfaces that are up. The ancient restriction banning renaming of busy network interfaces appears to be purposeless. Everything that depends on a network interface's name is done under the dev_base_lock in any case. This makes it much easier to use things like netconsole which bring up a network interface before userspace has started: presently these will cause interface renamings to fail, breaking any userspace that relies on renaming devices to avoid reliance on the potentially-unstable kernel-assigned name. Signed-off-by: Nick Alcock <nix@...eri.org.uk> --- net/core/dev.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) Note: this may very well be wrong, as I know essentially nothing about this part of the kernel. All I know is that without a patch something like this, netconsole is nearly useless to me, so many panics are uncapturable. Maybe there is some constraint preventing the kernel from reliably renaming up interfaces. In that case, netconsole, DHCP netboot discovery and so on probably need to grow the ability to rename them themselves. diff --git a/net/core/dev.c b/net/core/dev.c index b8f74cf..87e9f88 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -901,8 +901,6 @@ int dev_change_name(struct net_device *dev, const char *newname) BUG_ON(!dev_net(dev)); net = dev_net(dev); - if (dev->flags & IFF_UP) - return -EBUSY; if (!dev_valid_name(newname)) return -EINVAL; -- 1.6.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists