aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/kernel/trap_kern.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c
index 90690b9b1f30..d297429ac360 100644
--- a/arch/um/kernel/trap_kern.c
+++ b/arch/um/kernel/trap_kern.c
@@ -40,6 +40,12 @@ int handle_page_fault(unsigned long address, unsigned long ip,
40 int err = -EFAULT; 40 int err = -EFAULT;
41 41
42 *code_out = SEGV_MAPERR; 42 *code_out = SEGV_MAPERR;
43
44 /* If the fault was during atomic operation, don't take the fault, just
45 * fail. */
46 if (in_atomic())
47 goto out_nosemaphore;
48
43 down_read(&mm->mmap_sem); 49 down_read(&mm->mmap_sem);
44 vma = find_vma(mm, address); 50 vma = find_vma(mm, address);
45 if(!vma) 51 if(!vma)
@@ -90,6 +96,7 @@ survive:
90 flush_tlb_page(vma, address); 96 flush_tlb_page(vma, address);
91out: 97out:
92 up_read(&mm->mmap_sem); 98 up_read(&mm->mmap_sem);
99out_nosemaphore:
93 return(err); 100 return(err);
94 101
95/* 102/*