diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2018-06-12 12:59:30 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2018-06-12 12:59:30 +1000 |
commit | 886818546f2dcb6dc67babf589a1f03b8ac7982b (patch) | |
tree | 77f60a4dfef2b859c28ecc3b01c54147d336e52c /kernel/fork.c | |
parent | 4c5af229c7ce9d64673eb5c4b32128935a1e8c2f (diff) | |
parent | 8a85411459a4153d4c5519019b68d1946e534d68 (diff) | |
download | linux-next-886818546f2dcb6dc67babf589a1f03b8ac7982b.tar.gz |
Merge branch 'akpm-current/current'
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 08c6e5e217a0..03341e1854b4 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -440,6 +440,14 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, continue; } charge = 0; + /* + * Don't duplicate many vmas if we've been oom-killed (for + * example) + */ + if (fatal_signal_pending(current)) { + retval = -EINTR; + goto out; + } if (mpnt->vm_flags & VM_ACCOUNT) { unsigned long len = vma_pages(mpnt); @@ -1471,6 +1479,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) mutex_init(&sig->cred_guard_mutex); + sig->pdeath_signal_proc = current->signal->pdeath_signal_proc; + return 0; } |