aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/exec.c')
-rw-r--r--arch/um/kernel/exec.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index 8f774c25b76..5064fb691eb 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -18,17 +18,31 @@
18#include "irq_user.h" 18#include "irq_user.h"
19#include "tlb.h" 19#include "tlb.h"
20#include "os.h" 20#include "os.h"
21#include "mode_kern.h" 21#include "skas/skas.h"
22 22
23void flush_thread(void) 23void flush_thread(void)
24{ 24{
25 void *data = NULL;
26 unsigned long end = proc_mm ? task_size : CONFIG_STUB_START;
27 int ret;
28
25 arch_flush_thread(&current->thread.arch); 29 arch_flush_thread(&current->thread.arch);
26 flush_thread_skas(); 30
31 ret = unmap(&current->mm->context.skas.id, 0, end, 1, &data);
32 if(ret){
33 printk("flush_thread - clearing address space failed, "
34 "err = %d\n", ret);
35 force_sig(SIGKILL, current);
36 }
37
38 __switch_mm(&current->mm->context.skas.id);
27} 39}
28 40
29void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) 41void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
30{ 42{
31 start_thread_skas(regs, eip, esp); 43 set_fs(USER_DS);
44 PT_REGS_IP(regs) = eip;
45 PT_REGS_SP(regs) = esp;
32} 46}
33 47
34#ifdef CONFIG_TTY_LOG 48#ifdef CONFIG_TTY_LOG