[Devel] Re: [RFC][PATCH 03/14] use pid_nr in procfs
Eric W. Biederman
ebiederm at xmission.com
Wed Mar 21 00:11:31 PDT 2007
sukadev at us.ibm.com writes:
> From: Sukadev Bhattiprolu <sukadev at us.ibm.com>
> Subject: [RFC][PATCH 03/14] use pid_nr in procfs
>
> With containers, a process can have different pid_t values in different
> pid namespaces. To ensure we get the correct pid_t value in any context,
> we should use pid_nr() function rather than directly accessing either
> task->pid or pid->nr.
I almost agree here.
However pid_nr looks at current to figure out which pid namespace to
find the pid in. In the case of procfs we need to look at the
pid_namespace from the super block.
Eric
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list