From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH] ns: introduce getnspid syscall Date: Wed, 18 Jun 2014 20:02:37 +0200 Message-ID: <20140618180237.GA22219@redhat.com> References: <1403000496-10094-1-git-send-email-chenhanxiao@cn.fujitsu.com> <53A030CE.6070101@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <53A030CE.6070101-bzQdu9zFT3WakBO8gow8eQ@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: Pavel Emelyanov Cc: Richard Weinberger , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Serge Hallyn , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells , "Eric W. Biederman" , Andrew Morton , Al Viro List-Id: containers.vger.kernel.org On 06/17, Pavel Emelyanov wrote: > > On 06/17/2014 02:21 PM, Chen Hanxiao wrote: > > + case PIDTYPE_PID: > > + ret = task_pid_nr_ns(task, ns2); > > But this is not correct. If task doesn't live in ns2, but ns2 > just has the ns->level small enough, then the wrong pid value > would be reported. Confused... pid_nr_ns() checks upid->ns == ns and returns zero otherwise? Oleg.