summaryrefslogtreecommitdiff
path: root/arch/um/kernel/skas/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/skas/mmu.c')
-rw-r--r--arch/um/kernel/skas/mmu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index b56fe8b67a81..6da9ab4f5a18 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -114,6 +114,11 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
to_mm->id.u.pid = copy_context_skas0(stack,
from_mm->id.u.pid);
else to_mm->id.u.pid = start_userspace(stack);
+
+ if (to_mm->id.u.pid < 0) {
+ ret = to_mm->id.u.pid;
+ goto out_free;
+ }
}
ret = init_new_ldt(to_mm, from_mm);