summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2018-06-12 12:59:30 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2018-06-12 12:59:30 +1000
commit886818546f2dcb6dc67babf589a1f03b8ac7982b (patch)
tree77f60a4dfef2b859c28ecc3b01c54147d336e52c /kernel/fork.c
parent4c5af229c7ce9d64673eb5c4b32128935a1e8c2f (diff)
parent8a85411459a4153d4c5519019b68d1946e534d68 (diff)
downloadlinux-next-886818546f2dcb6dc67babf589a1f03b8ac7982b.tar.gz
Merge branch 'akpm-current/current'
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 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;
}