aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/mprotect.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 4c14d4289b61..5faf01ad3ef8 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -205,8 +205,7 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot)
205 /* 205 /*
206 * Does the application expect PROT_READ to imply PROT_EXEC: 206 * Does the application expect PROT_READ to imply PROT_EXEC:
207 */ 207 */
208 if (unlikely((prot & PROT_READ) && 208 if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
209 (current->personality & READ_IMPLIES_EXEC)))
210 prot |= PROT_EXEC; 209 prot |= PROT_EXEC;
211 210
212 vm_flags = calc_vm_prot_bits(prot); 211 vm_flags = calc_vm_prot_bits(prot);