aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/fault.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-10-20 13:41:44 -0400
committerTony Luck <tony.luck@intel.com>2005-10-20 13:41:44 -0400
commit9cec58dc138d6fcad9f447a19c8ff69f6540e667 (patch)
tree4fe1cca94fdba8b705c87615bee06d3346f687ce /arch/arm/mm/fault.c
parent17e5ad6c0ce5a970e2830d0de8bdd60a2f077d38 (diff)
parentac9b9c667c2e1194e22ebe0a441ae1c37aaa9b90 (diff)
Update from upstream with manual merge of Yasunori Goto's
changes to swiotlb.c made in commit 281dd25cdc0d6903929b79183816d151ea626341 since this file has been moved from arch/ia64/lib/swiotlb.c to lib/swiotlb.c Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/arm/mm/fault.c')
-rw-r--r--arch/arm/mm/fault.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 0b6c4db44e08..4a884baf3b9c 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -233,7 +233,17 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
233 if (in_interrupt() || !mm) 233 if (in_interrupt() || !mm)
234 goto no_context; 234 goto no_context;
235 235
236 down_read(&mm->mmap_sem); 236 /*
237 * As per x86, we may deadlock here. However, since the kernel only
238 * validly references user space from well defined areas of the code,
239 * we can bug out early if this is from code which shouldn't.
240 */
241 if (!down_read_trylock(&mm->mmap_sem)) {
242 if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
243 goto no_context;
244 down_read(&mm->mmap_sem);
245 }
246
237 fault = __do_page_fault(mm, addr, fsr, tsk); 247 fault = __do_page_fault(mm, addr, fsr, tsk);
238 up_read(&mm->mmap_sem); 248 up_read(&mm->mmap_sem);
239 249