Re: [RFC][PATCH 03/14] use pid_nr in procfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sukadev@xxxxxxxxxx writes:

> From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxx>
> 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.

To clarify my previous comment.  I believe to get this right
we need a factor of pid_nr:
pid_t __pid_nr(struct pid_namespace *ns, struct pid *pid)

That we can pass the pid_namespace from the super block of the
mount to handle the proc case.

This is a case I have wanted to avoid but in this instance I don't
see any other way to get the code correct.

i.e. Since the pid namespace of /proc gets set at mount time who
you are should not vary the result it gives.

Eric
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux