[PATCH v2 cgroup/for-3.11] cgroup: disallow rename(2) if sane_behavior

Li Zefan lizefan at huawei.com
Tue Jun 18 09:11:52 UTC 2013


On 2013/6/15 2:18, Tejun Heo wrote:
> cgroup's rename(2) isn't a proper migration implementation - it can't
> move the cgroup to a different parent in the hierarchy.  All it can do
> is swapping the name string for that cgroup.  This isn't useful and
> can mislead users to think that cgroup supports proper cgroup-level
> migration.  Disallow rename(2) if sane_behavior.
> 
> v2: Fail with -EPERM instead of -EINVAL so that it matches the vfs
>     return value when ->rename is not implemented as suggested by Li.
> 
> Signed-off-by: Tejun Heo <tj at kernel.org>
> Cc: Li Zefan <lizefan at huawei.com>
> ---
>  include/linux/cgroup.h |    2 ++
>  kernel/cgroup.c        |    7 +++++++
>  2 files changed, 9 insertions(+)
> 

Acked-by: Li Zefan <lizefan at huawei.com>



More information about the Containers mailing list