Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752571AbbBWOtX (ORCPT ); Mon, 23 Feb 2015 09:49:23 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:59390 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752492AbbBWOtV (ORCPT ); Mon, 23 Feb 2015 09:49:21 -0500 Date: Mon, 23 Feb 2015 15:49:07 +0100 From: Peter Zijlstra To: Aleksa Sarai Cc: tj@kernel.org, lizefan@huawei.com, mingo@redhat.com, richard@nod.at, fweisbec@gmail.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH RFC 1/2] cgroups: allow a cgroup subsystem to reject a fork Message-ID: <20150223144907.GZ5029@twins.programming.kicks-ass.net> References: <1424660891-12719-1-git-send-email-cyphar@cyphar.com> <1424660891-12719-2-git-send-email-cyphar@cyphar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424660891-12719-2-git-send-email-cyphar@cyphar.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 17 On Mon, Feb 23, 2015 at 02:08:10PM +1100, Aleksa Sarai wrote: > NOTE: I'm not sure if I'm doing enough cleanup inside copy_process(), > because a bunch of stuff happens between the last valid goto to the > bad_fork_free_pid label and cgroup_post_fork(). > > What is the correct way of doing cleanup this late inside > copy_process()? Its not; you're past the point of fail. You've already exposed the new process. If you want to allow fail, you'll have to do it earlier. -- 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/