Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbbK1DOp (ORCPT ); Fri, 27 Nov 2015 22:14:45 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:26189 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751254AbbK1DOS (ORCPT ); Fri, 27 Nov 2015 22:14:18 -0500 Subject: Re: [PATCH 0/3] cgroup: fix race between cgroup_post_fork() and cgroup_migrate() To: Oleg Nesterov , Aleksa Sarai , Johannes Weiner , Tejun Heo References: <20151127185705.GA14669@redhat.com> CC: From: Zefan Li Message-ID: <56591AED.7050808@huawei.com> Date: Sat, 28 Nov 2015 11:09:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20151127185705.GA14669@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.56591AF2.0092,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 801fae5c008ef0908bbae3ff352b419e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1264 Lines: 36 On 2015/11/28 2:57, Oleg Nesterov wrote: > On 11/26, Oleg Nesterov wrote: >> >> OK. I do not know what exactly do you mean, perhaps if you fix this problem >> the race between fork and attach goes away and in this case the fix I sent >> is not needed? > > Otherwise please consider this series. > > Slightly tested, seems to work; please review. > Allowing tasks migrating between cgroups while forking is problematic. I'm more than glad to see those changes. Acked-by: Zefan Li > Oleg. > > include/linux/cgroup-defs.h | 12 ++------ > include/linux/cgroup.h | 19 ++++--------- > include/linux/cgroup_subsys.h | 18 ------------ > kernel/cgroup.c | 30 +++++---------------- > kernel/cgroup_freezer.c | 2 +- > kernel/cgroup_pids.c | 58 +++++++--------------------------------- > kernel/fork.c | 16 ++++------- > kernel/sched/core.c | 2 +- > 8 files changed, 34 insertions(+), 123 deletions(-) > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/