From: Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: Richard Weinberger
<richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Serge Hallyn
<serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
Subject: Re: [PATCH] ns: introduce getnspid syscall
Date: Wed, 18 Jun 2014 20:02:37 +0200 [thread overview]
Message-ID: <20140618180237.GA22219@redhat.com> (raw)
In-Reply-To: <53A030CE.6070101-bzQdu9zFT3WakBO8gow8eQ@public.gmane.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.
WARNING: multiple messages have this Message-ID (diff)
From: Oleg Nesterov <oleg@redhat.com>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>,
containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Serge Hallyn <serge.hallyn@ubuntu.com>,
"Daniel P. Berrange" <berrange@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>,
David Howells <dhowells@redhat.com>,
Richard Weinberger <richard.weinberger@gmail.com>,
Vasiliy Kulikov <segooon@gmail.com>,
Gotou Yasunori <y-goto@jp.fujitsu.com>
Subject: Re: [PATCH] ns: introduce getnspid syscall
Date: Wed, 18 Jun 2014 20:02:37 +0200 [thread overview]
Message-ID: <20140618180237.GA22219@redhat.com> (raw)
In-Reply-To: <53A030CE.6070101@parallels.com>
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.
next prev parent reply other threads:[~2014-06-18 18:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 10:21 [PATCH] ns: introduce getnspid syscall Chen Hanxiao
2014-06-17 10:21 ` Chen Hanxiao
[not found] ` <1403000496-10094-1-git-send-email-chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2014-06-17 12:13 ` Pavel Emelyanov
2014-06-17 12:13 ` Pavel Emelyanov
[not found] ` <53A030CE.6070101-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2014-06-18 8:28 ` chenhanxiao-BthXqXjhjHXQFUHtdCDX3A
2014-06-18 8:28 ` chenhanxiao
2014-06-18 18:02 ` Oleg Nesterov [this message]
2014-06-18 18:02 ` Oleg Nesterov
[not found] ` <20140618180237.GA22219-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-18 19:10 ` Pavel Emelyanov
2014-06-18 19:10 ` Pavel Emelyanov
2014-06-17 18:27 ` Michael Kerrisk
2014-06-17 18:27 ` Michael Kerrisk
[not found] ` <CAHO5Pa0SHZXsbT14adxnMYGg6dG0DaMabNoreWAO-JDCCUKmWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-18 8:29 ` chenhanxiao-BthXqXjhjHXQFUHtdCDX3A
2014-06-18 8:29 ` chenhanxiao
2014-06-17 18:27 ` Michael Kerrisk
2014-06-18 1:12 ` Eric W. Biederman
2014-06-18 1:31 ` Eric W. Biederman
2014-06-18 1:31 ` Eric W. Biederman
[not found] ` <87fvj3ngv0.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2014-06-18 10:03 ` chenhanxiao-BthXqXjhjHXQFUHtdCDX3A
2014-06-18 10:03 ` chenhanxiao
2014-06-18 17:58 ` Oleg Nesterov
2014-06-18 17:58 ` Oleg Nesterov
[not found] ` <20140618175807.GA21565-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-20 9:14 ` chenhanxiao-BthXqXjhjHXQFUHtdCDX3A
2014-06-20 9:14 ` chenhanxiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140618180237.GA22219@redhat.com \
--to=oleg-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
--cc=xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.