net: dev_change_net_namespace: send a KOBJ_REMOVED/KOBJ_ADD

Stéphane Graber stgraber at ubuntu.com
Tue Dec 11 20:19:38 UTC 2012


Hello kernel people,

I'm currently in the process of debugging and hopefully fixing
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1065684

As part of the fix, I noticed the lack of device removal events when a
network device is moved to a network namespace.
This causes a variety of software doing state tracking for the network
devices to completely fail as they'll see twice as many added events as
removed events, leading to a fair bit of wasted resources and potential
crashes (for anything trying to access the sysfs entry of a removed
interface).

After discussing this issue with Serge a while ago, we figured the best
way to fix that was simply to have a removed event emitted to the origin
namespace and an added event emitted to the target namespace.

This has been implemented by Serge and is currently sitting in
linux-next, I'd appreciate if you could pull this into our current 3.7
kernel so I can confirm that this all works as expected and that there's
no extra changes to be done in userspace:

http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff_plain;h=4e66ae2ea371cf431283e2cb95480eb860432856

The change is pretty trivial and should make it to 3.8, so it should be
pretty low risk.

I'd have loved to test this by building a test kernel myself, however
due to an unfortunate secureboot bug my machine won't let me boot
anything that hasn't been signed by the ubuntu key, so I need this in
the archive :)

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20121211/622cfc29/attachment.sig>


More information about the kernel-team mailing list