Ver Fonte

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 <ralf@linux-mips.org>
Ralf Baechle há 10 anos atrás
pai
commit
e070dab735
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      arch/mips/mm/fault.c

+ 2 - 1
arch/mips/mm/fault.c

@@ -133,7 +133,8 @@ good_area:
 #endif
 #endif
 				goto bad_area;
 				goto bad_area;
 			}
 			}
-			if (!(vma->vm_flags & VM_READ)) {
+			if (!(vma->vm_flags & VM_READ) &&
+			    exception_epc(regs) != address) {
 #if 0
 #if 0
 				pr_notice("Cpu%d[%s:%d:%0*lx:%ld:%0*lx] RI violation\n",
 				pr_notice("Cpu%d[%s:%d:%0*lx:%ld:%0*lx] RI violation\n",
 					  raw_smp_processor_id(),
 					  raw_smp_processor_id(),