@@ -24,11 +24,6 @@ void flush_thread(void)
{
arch_flush_thread(¤t->thread.arch);
- unmap(¤t->mm->context.id, 0, TASK_SIZE);
- if (syscall_stub_flush(¤t->mm->context.id) < 0) {
- printk(KERN_ERR "%s - clearing address space failed", __func__);
- force_sig(SIGKILL);
- }
get_safe_registers(current_pt_regs()->regs.gp,
current_pt_regs()->regs.fp);
@@ -39,6 +39,9 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
goto out_free;
}
+ /* Ensure the new MM is clean and nothing unwanted is mapped */
+ unmap(new_id, 0, STUB_START);
+
return 0;
out_free: