diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index f2d3115483da..2005c5c180de 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -775,6 +775,14 @@ struct task_struct *copy_process(unsigned long clone_flags, 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 * thing. */ |
