From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH RESEND] cgroup: remove subsystem files when remounting cgroup Date: Mon, 3 Dec 2012 08:34:23 -0800 Message-ID: <20121203163423.GC19802@htj.dyndns.org> References: <1354292489-18434-2-git-send-email-gaofeng@cn.fujitsu.com> <1354498098-17312-1-git-send-email-gaofeng@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1354498098-17312-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 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: Gao feng Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: containers.vger.kernel.org On Mon, Dec 03, 2012 at 09:28:18AM +0800, Gao feng wrote: > cgroup_clear_directroy is called by cgroup_d_remove_dir > and cgroup_remount. > > when we call cgroup_remount to remount the cgroup,the subsystem > may be unlinked from cgroupfs_root->subsys_list in rebind_subsystem,this > subsystem's files will not be removed in cgroup_clear_directroy. > And the system will panic when we try to access these files. > > this patch removes subsystems's files before rebind_subsystems, > if rebind_subsystems failed, repopulate these removed files. > > With help from Tejun. > > Signed-off-by: Gao feng Applied to cgroup/for-3.8 with spaces added after commas. Thanks! -- tejun