]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/um/kernel/exec.c
Merge branch 'pending' of master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
[linux-2.6-omap-h63xx.git] / arch / um / kernel / exec.c
index 0d260567fd159786872a9668dca8727aea4353fe..f5d7f4569ba726f51fc92ef1b3b7e0ccdcb4e230 100644 (file)
@@ -11,6 +11,7 @@
 #include "asm/current.h"
 #include "asm/processor.h"
 #include "asm/uaccess.h"
+#include "as-layout.h"
 #include "mem_user.h"
 #include "skas.h"
 #include "os.h"
 void flush_thread(void)
 {
        void *data = NULL;
-       unsigned long end = proc_mm ? task_size : CONFIG_STUB_START;
        int ret;
 
        arch_flush_thread(&current->thread.arch);
 
-       ret = unmap(&current->mm->context.skas.id, 0, end, 1, &data);
+       ret = unmap(&current->mm->context.id, 0, STUB_START, 0, &data);
+       ret = ret || unmap(&current->mm->context.id, STUB_END,
+                          host_task_size - STUB_END, 1, &data);
        if (ret) {
                printk(KERN_ERR "flush_thread - clearing address space failed, "
                       "err = %d\n", ret);
                force_sig(SIGKILL, current);
        }
 
-       __switch_mm(&current->mm->context.skas.id);
+       __switch_mm(&current->mm->context.id);
 }
 
 void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
@@ -75,7 +77,7 @@ long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
 
        err = execve1(file, argv, env);
        if (!err)
-               do_longjmp(current->thread.exec_buf, 1);
+               UML_LONGJMP(current->thread.exec_buf, 1);
        return err;
 }