uml: speed up exec
[linux-2.6.git] / arch / um / kernel / skas / exec.c
index 54b795951372a8034cf40d30be457897d01b1c25..580eb6468949f56646732119d07745013dc36d95 100644 (file)
 
 void flush_thread_skas(void)
 {
-       force_flush_all();
+       void *data = NULL;
+       unsigned long end = proc_mm ? task_size : CONFIG_STUB_START;
+       int ret;
+
+       ret = unmap(&current->mm->context.skas.id, 0, end, 1, &data);
+       if(ret){
+               printk("flush_thread_skas - clearing address space failed, "
+                      "err = %d\n", ret);
+               force_sig(SIGKILL, current);
+       }
+
        switch_mm_skas(&current->mm->context.skas.id);
 }