diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-12-21 20:27:12 -0800 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-12-25 16:10:05 -0800 |
commit | c876ad7682155958d0c9c27afe9017925c230d64 (patch) | |
tree | 926064bd7909f60daed3b6b963555e57cab7b520 /kernel/user_namespace.c | |
parent | 8382fcac1b813ad0a4e68a838fc7ae93fa39eda0 (diff) |
pidns: Stop pid allocation when init dies
Oleg pointed out that in a pid namespace the sequence.
- pid 1 becomes a zombie
- setns(thepidns), fork,...
- reaping pid 1.
- The injected processes exiting.
Can lead to processes attempting access their child reaper and
instead following a stale pointer.
That waitpid for init can return before all of the processes in
the pid namespace have exited is also unfortunate.
Avoid these problems by disabling the allocation of new pids in a pid
namespace when init dies, instead of when the last process in a pid
namespace is reaped.
Pointed-out-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/user_namespace.c')
0 files changed, 0 insertions, 0 deletions