diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-20 07:52:19 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-20 07:55:50 -0400 |
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) | |||
271 | if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc)) | 271 | if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc)) |
272 | goto no_context; | 272 | goto no_context; |
273 | down_read(&mm->mmap_sem); | 273 | down_read(&mm->mmap_sem); |
274 | } else { | ||
275 | /* | ||
276 | * The above down_read_trylock() might have succeeded in | ||
277 | * which case, we'll have missed the might_sleep() from | ||
278 | * down_read() | ||
279 | */ | ||
280 | might_sleep(); | ||
274 | } | 281 | } |
275 | 282 | ||
276 | fault = __do_page_fault(mm, addr, fsr, tsk); | 283 | fault = __do_page_fault(mm, addr, fsr, tsk); |