OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH 03/14] use pid_nr in procfs
Re: [RFC][PATCH 03/14] use pid_nr in procfs [message #17924 is a reply to message #17909] Wed, 21 March 2007 07:11 Go to previous messageGo to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
sukadev@us.ibm.com writes:

> From: Sukadev Bhattiprolu <sukadev@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@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC][PATCH 10/14] Use pid ns from pid_nrs list
Next Topic: - remove-the-likelypid-check-in-copy_process.patch removed from -mm tree
Goto Forum:
  


Current Time: Sat Aug 23 15:49:14 GMT 2025

Total time taken to generate the page: 0.06126 seconds