diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-20 12:52:19 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-20 12:55:50 +0100 |
commit | bf4569922b97824f33e5d08d0bbe4b34fe43e4cd (patch) | |
tree | 09d3bc1252c44c70a9f4090486daa1329189da0c /arch/arm/mm | |
parent | b42c6344b091db680fd1ec7a0483e8b6796f802b (diff) |
ARM: Ensure correct might_sleep() check in pagefault path
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/fault.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 501304f7e30c..b8b3bb4423cf 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -271,6 +271,13 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc)) goto no_context; down_read(&mm->mmap_sem); + } else { + /* + * The above down_read_trylock() might have succeeded in + * which case, we'll have missed the might_sleep() from + * down_read() + */ + might_sleep(); } fault = __do_page_fault(mm, addr, fsr, tsk); |