diff options
-rw-r--r-- | arch/x86/mm/fault.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index c0c82bc143c9..ec08d8389850 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -91,13 +91,10 @@ static int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
91 | int prefetch = 0; | 91 | int prefetch = 0; |
92 | unsigned char *max_instr; | 92 | unsigned char *max_instr; |
93 | 93 | ||
94 | #ifdef CONFIG_X86_32 | 94 | /* |
95 | /* Catch an obscure case of prefetch inside an NX page: */ | 95 | * If it was a exec (instruction fetch) fault on NX page, then |
96 | if ((__supported_pte_mask & _PAGE_NX) && (error_code & 16)) | 96 | * do not ignore the fault: |
97 | return 0; | 97 | */ |
98 | #endif | ||
99 | |||
100 | /* If it was a exec fault on NX page, ignore */ | ||
101 | if (error_code & PF_INSTR) | 98 | if (error_code & PF_INSTR) |
102 | return 0; | 99 | return 0; |
103 | 100 | ||