Commit 9a55d5ea authored by Thomas Gleixner's avatar Thomas Gleixner

x86-decouple-page-fault-logic

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 5e918aee
......@@ -1032,7 +1032,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
* If we're in an interrupt, have no user context or are running
* in an atomic region then we must not take the fault:
*/
if (unlikely(in_atomic() || !mm)) {
if (unlikely(in_atomic() || !mm || current->pagefault_disabled)) {
bad_area_nosemaphore(regs, error_code, address);
return;
}
......
......@@ -37,6 +37,7 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
enum fixed_addresses idx;
unsigned long vaddr;
preempt_disable();
pagefault_disable();
debug_kmap_atomic(type);
......@@ -83,5 +84,6 @@ iounmap_atomic(void *kvaddr, enum km_type type)
kpte_clear_flush(kmap_pte-idx, vaddr);
pagefault_enable();
preempt_enable();
}
EXPORT_SYMBOL_GPL(iounmap_atomic);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment