These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / um / kernel / skas / mmu.c
index 94abdcc..9591a66 100644 (file)
@@ -1,4 +1,5 @@
 /*
+ * Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de)
  * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
@@ -8,12 +9,11 @@
 #include <linux/slab.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
+#include <asm/sections.h>
 #include <as-layout.h>
 #include <os.h>
 #include <skas.h>
 
-extern int __syscall_stub_start;
-
 static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
                         unsigned long kernel)
 {
@@ -62,10 +62,12 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
        if (current->mm != NULL && current->mm != &init_mm)
                from_mm = &current->mm->context;
 
+       block_signals();
        if (from_mm)
                to_mm->id.u.pid = copy_context_skas0(stack,
                                                     from_mm->id.u.pid);
        else to_mm->id.u.pid = start_userspace(stack);
+       unblock_signals();
 
        if (to_mm->id.u.pid < 0) {
                ret = to_mm->id.u.pid;
@@ -93,7 +95,7 @@ void uml_setup_stubs(struct mm_struct *mm)
        int err, ret;
 
        ret = init_stub_pte(mm, STUB_CODE,
-                           (unsigned long) &__syscall_stub_start);
+                           (unsigned long) __syscall_stub_start);
        if (ret)
                goto out;
 
@@ -101,7 +103,7 @@ void uml_setup_stubs(struct mm_struct *mm)
        if (ret)
                goto out;
 
-       mm->context.stub_pages[0] = virt_to_page(&__syscall_stub_start);
+       mm->context.stub_pages[0] = virt_to_page(__syscall_stub_start);
        mm->context.stub_pages[1] = virt_to_page(mm->context.id.stack);
 
        /* dup_mmap already holds mmap_sem */