[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141118213014.GA5010@redhat.com>
Date: Tue, 18 Nov 2014 22:30:14 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Aaron Tomlin <atomlin@...hat.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Kay Sievers <kay@...y.org>,
Lennart Poettering <lennart@...ttering.net>,
Sterling Alexander <stalexan@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/6] exit: reparent: fix the dead-parent
PR_SET_CHILD_SUBREAPER reparenting
The ->has_child_subreaper code in find_new_reaper() finds alive
"thread" but returns another "reaper" thread which can be dead.
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
---
kernel/exit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index f773863..31da440 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -512,7 +512,7 @@ static struct task_struct *find_new_reaper(struct task_struct *father)
thread = reaper;
do {
if (!(thread->flags & PF_EXITING))
- return reaper;
+ return thread;
} while_each_thread(reaper, thread);
}
}
--
1.5.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists