diff options
author | Oleg Nesterov <[email protected]> | 2008-09-02 14:35:49 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2008-09-02 19:21:38 -0700 |
commit | 950bbabb5a804690a0201190de5c22837f72f83f (patch) | |
tree | 0d198ac02244138936acdf201c80aa4cd2da0bbc /fs/jbd2/commit.c | |
parent | add0d4dfd660e9e4fd0af3eac3cad23583c9558f (diff) |
pid_ns: (BUG 11391) change ->child_reaper when init->group_leader exits
We don't change pid_ns->child_reaper when the main thread of the
subnamespace init exits. As Robert Rex <[email protected]> pointed
out this is wrong.
Yes, the re-parenting itself works correctly, but if the reparented task
exits it needs ->parent->nsproxy->pid_ns in do_notify_parent(), and if the
main thread is zombie its ->nsproxy was already cleared by
exit_task_namespaces().
Introduce the new function, find_new_reaper(), which finds the new
->parent for the re-parenting and changes ->child_reaper if needed. Kill
the now unneeded exit_child_reaper().
Also move the changing of ->child_reaper from zap_pid_ns_processes() to
find_new_reaper(), this consolidates the games with ->child_reaper and
makes it stable under tasklist_lock.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11391
Reported-by: Robert Rex <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Acked-by: Pavel Emelyanov <[email protected]>
Acked-by: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions