Commit 8912ad07 authored by Albert Cahalan's avatar Albert Cahalan Committed by Linus Torvalds

[PATCH] shared signals require shared VM

Elimination of this nonsense allows for the assumption
that a task group shares VM. This lets procps run faster.
parent 36fe8858
...@@ -774,6 +774,14 @@ struct task_struct *copy_process(unsigned long clone_flags, ...@@ -774,6 +774,14 @@ struct task_struct *copy_process(unsigned long clone_flags,
if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND)) if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
/*
* Shared signal handlers imply shared VM. By way of the above,
* thread groups also imply shared VM. Blocking this case allows
* for various simplifications in other code.
*/
if ((clone_flags & CLONE_SIGHAND) && !(clone_flags & CLONE_VM))
return ERR_PTR(-EINVAL);
/* /*
* CLONE_DETACHED must match CLONE_THREAD: it's a historical * CLONE_DETACHED must match CLONE_THREAD: it's a historical
* thing. * thing.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment