Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9168
b: refs/heads/master
c: 840ff6a
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Sep 20, 2005
1 parent c379dd7 commit 9c2f013
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fe10ab19046d84f3fd243436cbd5fa01019e809
refs/heads/master: 840ff6a4f6174d7fe19c206b5f36ff64123a2f45
12 changes: 11 additions & 1 deletion trunk/arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,17 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
if (in_interrupt() || !mm)
goto no_context;

down_read(&mm->mmap_sem);
/*
* As per x86, we may deadlock here. However, since the kernel only
* validly references user space from well defined areas of the code,
* we can bug out early if this is from code which shouldn't.
*/
if (!down_read_trylock(&mm->mmap_sem)) {
if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
goto no_context;
down_read(&mm->mmap_sem);
}

fault = __do_page_fault(mm, addr, fsr, tsk);
up_read(&mm->mmap_sem);

Expand Down

0 comments on commit 9c2f013

Please sign in to comment.