diff options
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 181c53bac3a7..9dc909841739 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/hugetlb.h> /* hstate_index_to_shift */ | 13 | #include <linux/hugetlb.h> /* hstate_index_to_shift */ |
14 | #include <linux/prefetch.h> /* prefetchw */ | 14 | #include <linux/prefetch.h> /* prefetchw */ |
15 | #include <linux/context_tracking.h> /* exception_enter(), ... */ | 15 | #include <linux/context_tracking.h> /* exception_enter(), ... */ |
16 | #include <linux/uaccess.h> /* faulthandler_disabled() */ | ||
16 | 17 | ||
17 | #include <asm/traps.h> /* dotraplinkage, ... */ | 18 | #include <asm/traps.h> /* dotraplinkage, ... */ |
18 | #include <asm/pgalloc.h> /* pgd_*(), ... */ | 19 | #include <asm/pgalloc.h> /* pgd_*(), ... */ |
@@ -1126,9 +1127,9 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
1126 | 1127 | ||
1127 | /* | 1128 | /* |
1128 | * If we're in an interrupt, have no user context or are running | 1129 | * If we're in an interrupt, have no user context or are running |
1129 | * in an atomic region then we must not take the fault: | 1130 | * in a region with pagefaults disabled then we must not take the fault |
1130 | */ | 1131 | */ |
1131 | if (unlikely(in_atomic() || !mm)) { | 1132 | if (unlikely(faulthandler_disabled() || !mm)) { |
1132 | bad_area_nosemaphore(regs, error_code, address); | 1133 | bad_area_nosemaphore(regs, error_code, address); |
1133 | return; | 1134 | return; |
1134 | } | 1135 | } |