Merge branch 'for-linus-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / arch / um / kernel / trap.c
index 34b633ec852f32f5d9bc5c26fa350be3822d7980..557232f758b61efe00462df9766f5a16e08ebbd3 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/sched.h>
 #include <linux/hardirq.h>
 #include <linux/module.h>
+#include <linux/uaccess.h>
 #include <asm/current.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
@@ -35,10 +36,10 @@ int handle_page_fault(unsigned long address, unsigned long ip,
        *code_out = SEGV_MAPERR;
 
        /*
-        * If the fault was during atomic operation, don't take the fault, just
+        * If the fault was with pagefaults disabled, don't take the fault, just
         * fail.
         */
-       if (in_atomic())
+       if (faulthandler_disabled())
                goto out_nosemaphore;
 
        if (is_user)