summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/fault.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-20 12:52:19 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-20 12:55:50 +0100
commitbf4569922b97824f33e5d08d0bbe4b34fe43e4cd (patch)
tree09d3bc1252c44c70a9f4090486daa1329189da0c /arch/arm/mm/fault.c
parentb42c6344b091db680fd1ec7a0483e8b6796f802b (diff)
downloadblackbird-op-linux-bf4569922b97824f33e5d08d0bbe4b34fe43e4cd.tar.gz
blackbird-op-linux-bf4569922b97824f33e5d08d0bbe4b34fe43e4cd.zip
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/fault.c')
-rw-r--r--arch/arm/mm/fault.c7
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);
OpenPOWER on IntegriCloud