提交 bf456992 编写于 作者: R Russell King

ARM: Ensure correct might_sleep() check in pagefault path

Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 b42c6344
...@@ -271,6 +271,13 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) ...@@ -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)) if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
goto no_context; goto no_context;
down_read(&mm->mmap_sem); 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); fault = __do_page_fault(mm, addr, fsr, tsk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册