diff options
author | Anfei <anfei.zhou@gmail.com> | 2010-06-08 10:16:49 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-06-08 14:39:57 -0400 |
commit | 5e27fb78df95e027723af2c90ecc9b4527ae59e9 (patch) | |
tree | 4f91874c2d4b2beef198e9116a500a76e5751cff /arch | |
parent | 17ebba1fe4da4b5d62782be8743e0e8231812af9 (diff) |
ARM: 6166/1: Proper prefetch abort handling on pre-ARMv6
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.
CC: <stable@kernel.org>
Signed-off-by: Anfei Zhou <anfei.zhou@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/fault.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 92f5801f99c1..cbfb2edcf7d1 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -393,6 +393,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
393 | if (addr < TASK_SIZE) | 393 | if (addr < TASK_SIZE) |
394 | return do_page_fault(addr, fsr, regs); | 394 | return do_page_fault(addr, fsr, regs); |
395 | 395 | ||
396 | if (user_mode(regs)) | ||
397 | goto bad_area; | ||
398 | |||
396 | index = pgd_index(addr); | 399 | index = pgd_index(addr); |
397 | 400 | ||
398 | /* | 401 | /* |