Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754734AbaFRTLA (ORCPT ); Wed, 18 Jun 2014 15:11:00 -0400 Received: from relay.parallels.com ([195.214.232.42]:44567 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754700AbaFRTK7 (ORCPT ); Wed, 18 Jun 2014 15:10:59 -0400 Message-ID: <53A1E41F.9010504@parallels.com> Date: Wed, 18 Jun 2014 23:10:23 +0400 From: Pavel Emelyanov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Oleg Nesterov CC: Chen Hanxiao , , , 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 References: <1403000496-10094-1-git-send-email-chenhanxiao@cn.fujitsu.com> <53A030CE.6070101@parallels.com> <20140618180237.GA22219@redhat.com> In-Reply-To: <20140618180237.GA22219@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [89.169.95.100] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/18/2014 10:02 PM, Oleg Nesterov wrote: > 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? Yes, you're right. I've missed that line of code :( > 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/