]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/um/kernel/exec.c
uml: cover stubs with a VMA
[karo-tx-linux.git] / arch / um / kernel / exec.c
index bf66b5b7bc685ac2c7e8661af69a860d6ba17773..76a62c0cb2bc89692e72df74a096df83f33487e5 100644 (file)
 void flush_thread(void)
 {
        void *data = NULL;
-       unsigned long end = proc_mm ? TASK_SIZE : STUB_START;
        int ret;
 
        arch_flush_thread(&current->thread.arch);
 
-       ret = unmap(&current->mm->context.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,
+                          TASK_SIZE - STUB_END, 1, &data);
        if (ret) {
                printk(KERN_ERR "flush_thread - clearing address space failed, "
                       "err = %d\n", ret);