Repository navigation
Commit 488e5bc
proc: proper pidns handling for /proc/self
Currently if you access a /proc that is not mounted with your processes
current pid namespace /proc/self will point at a completely random task.
This patch fixes /proc/self to point to the current process if it is
available in the particular mount of /proc or to return -ENOENT if the
current process is not visible.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent df5f831 commit 488e5bc
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
| 2104 | + | |
| 2105 | + | |
2104 | 2106 | | |
2105 | | - | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
2106 | 2110 | | |
2107 | 2111 | | |
2108 | 2112 | | |
2109 | 2113 | | |
2110 | 2114 | | |
| 2115 | + | |
| 2116 | + | |
2111 | 2117 | | |
2112 | | - | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
2113 | 2121 | | |
2114 | 2122 | | |
2115 | 2123 | | |
| |||
0 commit comments