aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/mm/fault.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
index 14ef7cceb208..d8b1b4ac7f26 100644
--- a/arch/ia64/mm/fault.c
+++ b/arch/ia64/mm/fault.c
@@ -146,9 +146,11 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
146# error File is out of sync with <linux/mm.h>. Please update. 146# error File is out of sync with <linux/mm.h>. Please update.
147# endif 147# endif
148 148
149 if (((isr >> IA64_ISR_R_BIT) & 1UL) && (!(vma->vm_flags & (VM_READ | VM_WRITE))))
150 goto bad_area;
151
149 mask = ( (((isr >> IA64_ISR_X_BIT) & 1UL) << VM_EXEC_BIT) 152 mask = ( (((isr >> IA64_ISR_X_BIT) & 1UL) << VM_EXEC_BIT)
150 | (((isr >> IA64_ISR_W_BIT) & 1UL) << VM_WRITE_BIT) 153 | (((isr >> IA64_ISR_W_BIT) & 1UL) << VM_WRITE_BIT));
151 | (((isr >> IA64_ISR_R_BIT) & 1UL) << VM_READ_BIT));
152 154
153 if ((vma->vm_flags & mask) != mask) 155 if ((vma->vm_flags & mask) != mask)
154 goto bad_area; 156 goto bad_area;