From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH v2 cgroup/for-3.11] cgroup: disallow rename(2) if sane_behavior Date: Tue, 18 Jun 2013 17:11:52 +0800 Message-ID: <51C02458.6050400@huawei.com> References: <20130614034717.GA31533@htj.dyndns.org> <20130614181822.GC6593@mtj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130614181822.GC6593-9pTldWuhBndy/B6EtB590w@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Kay Sievers , Lennart Poettering 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 > Cc: Li Zefan > --- > include/linux/cgroup.h | 2 ++ > kernel/cgroup.c | 7 +++++++ > 2 files changed, 9 insertions(+) > Acked-by: Li Zefan