[Devel] Re: [RESEND PATCH] pid_ns: Fix proc_flush_task() accessing freed proc_mnt

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Fri Jun 25 15:07:13 PDT 2010


Oleg Nesterov [oleg at redhat.com] wrote:
| On 06/25, Sukadev Bhattiprolu wrote:
| >
| > Oleg Nesterov [oleg at redhat.com] wrote:
| > | On 06/25, Sukadev Bhattiprolu wrote:
| > | >
| > | > Louis Rilling [Louis.Rilling at kerlabs.com] wrote:
| > | > | - proc_pid_readdir():
| > | > |   Needs similar check and protection to proc_pid_lookup(), but there is another
| > | > |   issue: next_tgid() can find a dying task:
| > | >
| > | > Hmm, I thought proc_pid_readdir() would be a problem too but convinced myself
| > | > that it would not - since a process running proc_pid_readdir() would have
| > | > a reference to the pid namespace,
| > |
| > | Where does this reference comes from ?
| >
| > Caller of proc_pid_readdir() would be living in the same pid namespace right ?
| 
| Afaics, in general not.
| 
| Suppose that we do something like
| 
| 	if (!clone(CLONE_NEWPID)) {
| 		mount("none", "/SUB_PROC", "proc", 0, NULL);
| 		exit();
| 	}
| 
| After that /SUB_PROC/ still exists, one can do "ls /SUB_PROC/".

Yes, I see it now. Thanks,

Sukadev
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list