diff options
Diffstat (limited to 'arch/powerpc/mm/fault.c')
| -rw-r--r-- | arch/powerpc/mm/fault.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 3767211b3d0f..ab3546c5ac3a 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
| @@ -283,7 +283,13 @@ good_area: | |||
| 283 | /* protection fault */ | 283 | /* protection fault */ |
| 284 | if (error_code & DSISR_PROTFAULT) | 284 | if (error_code & DSISR_PROTFAULT) |
| 285 | goto bad_area; | 285 | goto bad_area; |
| 286 | if (!(vma->vm_flags & VM_EXEC)) | 286 | /* |
| 287 | * Allow execution from readable areas if the MMU does not | ||
| 288 | * provide separate controls over reading and executing. | ||
| 289 | */ | ||
| 290 | if (!(vma->vm_flags & VM_EXEC) && | ||
| 291 | (cpu_has_feature(CPU_FTR_NOEXECUTE) || | ||
| 292 | !(vma->vm_flags & (VM_READ | VM_WRITE)))) | ||
| 287 | goto bad_area; | 293 | goto bad_area; |
| 288 | #else | 294 | #else |
| 289 | pte_t *ptep; | 295 | pte_t *ptep; |
