Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165702
b: refs/heads/master
c: 123be07
h: refs/heads/master
v: v3
  • Loading branch information
Sukadev Bhattiprolu authored and Linus Torvalds committed Sep 24, 2009
1 parent 9984797 commit 78c7bb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d65af789f3e2cf4cfbdbf71a0f7a61ebcd41d38
refs/heads/master: 123be07b0b399670a7cc3d82fef0cb4f93ef885c
10 changes: 10 additions & 0 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,16 @@ static struct task_struct *copy_process(unsigned long clone_flags,
if ((clone_flags & CLONE_SIGHAND) && !(clone_flags & CLONE_VM))
return ERR_PTR(-EINVAL);

/*
* Siblings of global init remain as zombies on exit since they are
* not reaped by their parent (swapper). To solve this and to avoid
* multi-rooted process trees, prevent global and container-inits
* from creating siblings.
*/
if ((clone_flags & CLONE_PARENT) &&
current->signal->flags & SIGNAL_UNKILLABLE)
return ERR_PTR(-EINVAL);

retval = security_task_create(clone_flags);
if (retval)
goto fork_out;
Expand Down

0 comments on commit 78c7bb0

Please sign in to comment.