diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/fault.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 14a0c6e541de..99d273dbc758 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -92,18 +92,13 @@ static int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
92 | unsigned char *max_instr; | 92 | unsigned char *max_instr; |
93 | 93 | ||
94 | #ifdef CONFIG_X86_32 | 94 | #ifdef CONFIG_X86_32 |
95 | # ifdef CONFIG_X86_PAE | 95 | if (!(__supported_pte_mask & _PAGE_NX)) |
96 | /* If it was a exec fault on NX page, ignore */ | ||
97 | if (nx_enabled && (error_code & PF_INSTR)) | ||
98 | return 0; | 96 | return 0; |
99 | # else | 97 | #endif |
100 | return 0; | 98 | |
101 | # endif | ||
102 | #else /* CONFIG_X86_64 */ | ||
103 | /* If it was a exec fault on NX page, ignore */ | 99 | /* If it was a exec fault on NX page, ignore */ |
104 | if (error_code & PF_INSTR) | 100 | if (error_code & PF_INSTR) |
105 | return 0; | 101 | return 0; |
106 | #endif | ||
107 | 102 | ||
108 | instr = (unsigned char *)convert_ip_to_linear(current, regs); | 103 | instr = (unsigned char *)convert_ip_to_linear(current, regs); |
109 | max_instr = instr + 15; | 104 | max_instr = instr + 15; |