Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / arch / x86 / mm / highmem_32.c
index 4500142..eecb207 100644 (file)
@@ -35,7 +35,7 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot)
        unsigned long vaddr;
        int idx, type;
 
-       /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
+       preempt_disable();
        pagefault_disable();
 
        if (!PageHighMem(page))
@@ -100,6 +100,7 @@ void __kunmap_atomic(void *kvaddr)
 #endif
 
        pagefault_enable();
+       preempt_enable();
 }
 EXPORT_SYMBOL(__kunmap_atomic);