diff options
Diffstat (limited to 'arch/um/kernel/skas/mmu.c')
-rw-r--r-- | arch/um/kernel/skas/mmu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 511a855c9ec0..d232daa42c31 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -75,6 +75,7 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, | |||
75 | int init_new_context_skas(struct task_struct *task, struct mm_struct *mm) | 75 | int init_new_context_skas(struct task_struct *task, struct mm_struct *mm) |
76 | { | 76 | { |
77 | struct mm_struct *cur_mm = current->mm; | 77 | struct mm_struct *cur_mm = current->mm; |
78 | struct mm_id *cur_mm_id = &cur_mm->context.skas.id; | ||
78 | struct mm_id *mm_id = &mm->context.skas.id; | 79 | struct mm_id *mm_id = &mm->context.skas.id; |
79 | unsigned long stack; | 80 | unsigned long stack; |
80 | int from, ret; | 81 | int from, ret; |
@@ -115,7 +116,11 @@ int init_new_context_skas(struct task_struct *task, struct mm_struct *mm) | |||
115 | goto out_free; | 116 | goto out_free; |
116 | 117 | ||
117 | mm->nr_ptes--; | 118 | mm->nr_ptes--; |
118 | mm_id->u.pid = start_userspace(stack); | 119 | |
120 | if((cur_mm != NULL) && (cur_mm != &init_mm)) | ||
121 | mm_id->u.pid = copy_context_skas0(stack, | ||
122 | cur_mm_id->u.pid); | ||
123 | else mm_id->u.pid = start_userspace(stack); | ||
119 | } | 124 | } |
120 | 125 | ||
121 | return 0; | 126 | return 0; |