diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 46060cb24af0..b373322ca497 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1478,9 +1478,7 @@ static int unshare_vm(unsigned long unshare_flags, struct mm_struct **new_mmp) | |||
1478 | 1478 | ||
1479 | if ((unshare_flags & CLONE_VM) && | 1479 | if ((unshare_flags & CLONE_VM) && |
1480 | (mm && atomic_read(&mm->mm_users) > 1)) { | 1480 | (mm && atomic_read(&mm->mm_users) > 1)) { |
1481 | *new_mmp = dup_mm(current); | 1481 | return -EINVAL; |
1482 | if (!*new_mmp) | ||
1483 | return -ENOMEM; | ||
1484 | } | 1482 | } |
1485 | 1483 | ||
1486 | return 0; | 1484 | return 0; |