aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-09-15 08:17:27 -0400
committerDavid S. Miller <davem@davemloft.net>2019-09-15 08:17:27 -0400
commitaa2eaa8c272a3211dec07ce9c6c863a7e355c10e (patch)
tree8454a23d36b2ff36133c276ee0ba80eabc00850e /kernel/fork.c
parenta3d3c74da49c65fc63a937fa559186b0e16adca3 (diff)
parent1609d7604b847a9820e63393d1a3b6cac7286d40 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor overlapping changes in the btusb and ixgbe drivers. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 2852d0e76ea3..541fd805fb88 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2338,6 +2338,8 @@ struct mm_struct *copy_init_mm(void)
2338 * 2338 *
2339 * It copies the process, and if successful kick-starts 2339 * It copies the process, and if successful kick-starts
2340 * it and waits for it to finish using the VM if required. 2340 * it and waits for it to finish using the VM if required.
2341 *
2342 * args->exit_signal is expected to be checked for sanity by the caller.
2341 */ 2343 */
2342long _do_fork(struct kernel_clone_args *args) 2344long _do_fork(struct kernel_clone_args *args)
2343{ 2345{
@@ -2562,6 +2564,14 @@ noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs,
2562 if (copy_from_user(&args, uargs, size)) 2564 if (copy_from_user(&args, uargs, size))
2563 return -EFAULT; 2565 return -EFAULT;
2564 2566
2567 /*
2568 * Verify that higher 32bits of exit_signal are unset and that
2569 * it is a valid signal
2570 */
2571 if (unlikely((args.exit_signal & ~((u64)CSIGNAL)) ||
2572 !valid_signal(args.exit_signal)))
2573 return -EINVAL;
2574
2565 *kargs = (struct kernel_clone_args){ 2575 *kargs = (struct kernel_clone_args){
2566 .flags = args.flags, 2576 .flags = args.flags,
2567 .pidfd = u64_to_user_ptr(args.pidfd), 2577 .pidfd = u64_to_user_ptr(args.pidfd),