From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751171Ab3HSR5L (ORCPT ); Mon, 19 Aug 2013 13:57:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45154 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961Ab3HSR5K (ORCPT ); Mon, 19 Aug 2013 13:57:10 -0400 Date: Mon, 19 Aug 2013 19:51:24 +0200 From: Oleg Nesterov To: Linus Torvalds Cc: Andy Lutomirski , Brad Spengler , "Eric W. Biederman" , Colin Walters , Linux Kernel Mailing List Subject: Re: PATCH? fix unshare(NEWPID) && vfork() Message-ID: <20130819175124.GA23167@redhat.com> References: <20130819172524.GA22268@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/19, Linus Torvalds wrote: > > So I think your patch is correct, although I'm not sure why you move > the test. I didn't really, we have 2 tests, in do_fork() and copy_process(). I think it would be better to do the similar checks in one place. This is off-topic and needs a separate change anyway, but perhaps we should add the new helper which checks clone_flags. copy_process() is huge. > The new test you have look complicated as hell, so I think > you're actually making things worse by making them unreadable. Oh I agree. I'll wait for the comments on intent, then try to cleanup it somehow. Unless a better fix comes. Oleg.