[Devel] Why real device can't move to container when sysfs is enabled?

Andrew Vagin avagin at gmail.com
Fri Jun 18 03:33:22 PDT 2010


This bug is apeared because of 
http://git.openvz.org/?p=linux-2.6.32-openvz;a=commit;h=3891845e1ef6e6807075d4241966b26f6ecb0a5c
sysfs in openvz is virtualized, so changes from this commit isn't 
suitable for ovz.
Please file a kernel bug to http://bugzilla.openvz.org/ 
<http://bugzilla.openvz.org/,>

On 06/18/2010 12:50 PM, 贺鹏 wrote:
> I'm using the openvz kernel 2.6.32,  and found that I can't netdev_add 
> a real net device to a container.
>
> I found the function* __dev_change_net_namespac*e in net/core/dev.c, 
> and it says:
>
>
> #ifdef CONFIG_SYSFS
>         /* Don't allow real devices to be moved when sysfs
>          * is enabled.
>          */
>         err = -EINVAL;
>         if (dev->dev.parent)
>                 goto out;
> #endif
>
>
> It seems if you enable CONFIG_SYSFS, you can't add a real device to a 
> container with the netdev_add command.
>
> I'm confused about this, because under kernel 2.6.18, it's ok to add a 
> real device when sysfs is enabled.
>
> Why forbid this?
> and if I want to add a net device, How?
>
>
> -- 
> hepeng
> ICT
>
>
> _______________________________________________
> Devel mailing list
> Devel at openvz.org
> https://openvz.org/mailman/listinfo/devel
>    





More information about the Devel mailing list