Skip to content

Commit

Permalink
ARM: 6166/1: Proper prefetch abort handling on pre-ARMv6
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anfei authored and Russell King committed Jun 8, 2010
1 parent 17ebba1 commit 5e27fb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,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);

/*
Expand Down

0 comments on commit 5e27fb7

Please sign in to comment.