|
@@ -492,7 +492,9 @@ static struct task_struct *find_new_reaper(struct task_struct *father)
|
|
|
|
|
|
zap_pid_ns_processes(pid_ns);
|
|
zap_pid_ns_processes(pid_ns);
|
|
write_lock_irq(&tasklist_lock);
|
|
write_lock_irq(&tasklist_lock);
|
|
- } else if (father->signal->has_child_subreaper) {
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (father->signal->has_child_subreaper) {
|
|
struct task_struct *reaper;
|
|
struct task_struct *reaper;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -502,7 +504,7 @@ static struct task_struct *find_new_reaper(struct task_struct *father)
|
|
* PID namespace. However we still need the check above, see
|
|
* PID namespace. However we still need the check above, see
|
|
* http://marc.info/?l=linux-kernel&m=131385460420380
|
|
* http://marc.info/?l=linux-kernel&m=131385460420380
|
|
*/
|
|
*/
|
|
- for (reaper = father->real_parent;
|
|
|
|
|
|
+ for (reaper = father;
|
|
reaper != &init_task;
|
|
reaper != &init_task;
|
|
reaper = reaper->real_parent) {
|
|
reaper = reaper->real_parent) {
|
|
if (same_thread_group(reaper, pid_ns->child_reaper))
|
|
if (same_thread_group(reaper, pid_ns->child_reaper))
|