summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorAnfei <anfei.zhou@gmail.com>2010-06-08 15:16:49 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-05 11:10:51 -0700
commit39be45ee5ca20b54cdcf74c77933acc3f560ed7c (patch)
tree28cec73b9cbb119930d3385aba96ff16f3db3b93 /arch/arm
parent12a5a0e39bc503ccbbf68e697d06397cba2afc79 (diff)
ARM: 6166/1: Proper prefetch abort handling on pre-ARMv6
commit 5e27fb78df95e027723af2c90ecc9b4527ae59e9 upstream. Instruction faults on pre-ARMv6 CPUs are interpreted as a 'translation fault', but do_translation_fault doesn't handle well if user mode trying to run instruction above TASK_SIZE, and result in the infinite retry of that instruction. Signed-off-by: Anfei Zhou <anfei.zhou@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mm/fault.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 10e06801afb3..3191cd659347 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -386,6 +386,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
if (addr < TASK_SIZE)
return do_page_fault(addr, fsr, regs);
+ if (user_mode(regs))
+ goto bad_area;
+
index = pgd_index(addr);
/*