mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
[PATCH] don't use REMOVE_LINKS/SET_LINKS for reparenting
There are places where kernel uses REMOVE_LINKS/SET_LINKS while changing process's ->parent. Use add_parent/remove_parent instead, they don't abuse of global process list. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8fafabd86f
commit
9b678ece42
2 changed files with 6 additions and 6 deletions
|
@ -238,10 +238,10 @@ static void reparent_to_init(void)
|
|||
|
||||
ptrace_unlink(current);
|
||||
/* Reparent to init */
|
||||
REMOVE_LINKS(current);
|
||||
remove_parent(current);
|
||||
current->parent = child_reaper;
|
||||
current->real_parent = child_reaper;
|
||||
SET_LINKS(current);
|
||||
add_parent(current);
|
||||
|
||||
/* Set the exit signal to SIGCHLD so we signal init on exit */
|
||||
current->exit_signal = SIGCHLD;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue