diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-23 19:03:21 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-23 19:03:21 -0400 |
commit | 536f8098026bde1368bbfcbcb9682a7637b73df2 (patch) | |
tree | cf83d2e1afa503b6aeba103b55cd1da0af4e7a4c /arch/arm/mm/fault.c | |
parent | e86ee6682b649183c11013a98be02f25e9ae399d (diff) | |
parent | 3fd07d3bf0077dcc0f5a33d2eb1938ea050da8da (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/arm/mm/fault.c')
-rw-r--r-- | arch/arm/mm/fault.c | 12 |
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 | ||