Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752264AbZJXDhU (ORCPT ); Fri, 23 Oct 2009 23:37:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751979AbZJXDhT (ORCPT ); Fri, 23 Oct 2009 23:37:19 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:43629 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbZJXDhS (ORCPT ); Fri, 23 Oct 2009 23:37:18 -0400 Date: Fri, 23 Oct 2009 20:38:39 -0700 From: Sukadev Bhattiprolu To: "Eric W. Biederman" Cc: Matt Helsley , Oren Laadan , Daniel Lezcano , randy.dunlap@oracle.com, arnd@arndb.de, linux-api@vger.kernel.org, Containers , Nathan Lynch , linux-kernel@vger.kernel.org, Louis.Rilling@kerlabs.com, kosaki.motohiro@jp.fujitsu.com, hpa@zytor.com, mingo@elte.hu, torvalds@linux-foundation.org, Alexey Dobriyan , roland@redhat.com, Pavel Emelyanov Subject: Re: [RFC][v8][PATCH 0/10] Implement clone3() system call Message-ID: <20091024033839.GA16430@us.ibm.com> References: <20091021062021.GA2667@us.ibm.com> <20091023004253.GA7915@us.ibm.com> <20091023053001.GA24972@us.ibm.com> <20091023192124.GA11088@us.ibm.com> <20091023204812.GA26524@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux 2.0.32 on an i486 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 Content-Length: 1011 Lines: 29 Eric W. Biederman [ebiederm@xmission.com] wrote: | > +static int set_pidmap(struct pid_namespace *pid_ns, int target) | > +{ | > + if (!target) | > + return alloc_pidmap(pid_ns); BTW, we need this now that the RESERVED_PIDS check is is conditional on ->last_pid. But this makes set_pidmap() completely general so should we have alloc_pid() call set_pidmap() always ? Or we could move this check into alloc_pid(), but it may be better to have all values of 'target' checked in one place. | > + | > + if (target >= pid_max) | > + return -EINVAL; | > + | > + if ((target < 0) || (target < RESERVED_PIDS && pid_ns == &init_pid_ns)) | > + return -EINVAL; | | if ((target < 0) || ((target < RESERVED_PIDS) && (pid_ns->last_pid >= RESERVED_PIDS))) | | Please. Ok. -- 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/