Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754068AbaFRSDt (ORCPT ); Wed, 18 Jun 2014 14:03:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12686 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbaFRSDs (ORCPT ); Wed, 18 Jun 2014 14:03:48 -0400 Date: Wed, 18 Jun 2014 20:02:37 +0200 From: Oleg Nesterov To: Pavel Emelyanov Cc: Chen Hanxiao , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Andrew Morton , "Eric W. Biederman" , Serge Hallyn , "Daniel P. Berrange" , Al Viro , David Howells , Richard Weinberger , Vasiliy Kulikov , Gotou Yasunori Subject: Re: [PATCH] ns: introduce getnspid syscall 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-Disposition: inline In-Reply-To: <53A030CE.6070101@parallels.com> 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 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. -- 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/