From: Ralf Baechle Date: Thu, 23 Jul 2015 09:10:38 +0000 (+0200) Subject: MIPS: Handle page faults of executable but unreadable pages correctly. X-Git-Tag: v4.2-rc6~2^2~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;ds=sidebyside;h=e070dab73523bcbf2409ba8b5c342d53bccc0959;p=linux-2.6-block.git MIPS: Handle page faults of executable but unreadable pages correctly. Without this we end taking execeptions in an endless loop hanging the thread. Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index 36c0f26fac6b..852a41c6da45 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c @@ -133,7 +133,8 @@ good_area: #endif goto bad_area; } - if (!(vma->vm_flags & VM_READ)) { + if (!(vma->vm_flags & VM_READ) && + exception_epc(regs) != address) { #if 0 pr_notice("Cpu%d[%s:%d:%0*lx:%ld:%0*lx] RI violation\n", raw_smp_processor_id(),