Commit 5e27fb78 authored by Anfei's avatar Anfei Committed by Russell King

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: default avatarAnfei Zhou <anfei.zhou@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 17ebba1f
...@@ -393,6 +393,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr, ...@@ -393,6 +393,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
if (addr < TASK_SIZE) if (addr < TASK_SIZE)
return do_page_fault(addr, fsr, regs); return do_page_fault(addr, fsr, regs);
if (user_mode(regs))
goto bad_area;
index = pgd_index(addr); index = pgd_index(addr);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment