aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2006-12-06 23:32:18 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:21 -0500
commit6edaf68a87d17570790fd55f0c451a29ec1d6703 (patch)
tree8ea1f3509dcf3e721919471dea67ef55a3aff78f /arch
parent3395ee0588795b0b3bd889c260e55959cf2b61f5 (diff)
[PATCH] mm: arch do_page_fault() vs in_atomic()
In light of the recent pagefault and filemap_copy_from_user work I've gone through all the arch pagefault handlers to make sure the inc_preempt_count() 'feature' works as expected. Several sections of code (including the new filemap_copy_from_user) rely on the fact that faults do not take locks under increased preempt count. arch/x86_64 - good arch/powerpc - good arch/cris - fixed arch/i386 - good arch/parisc - fixed arch/sh - good arch/sparc - good arch/s390 - good arch/m68k - fixed arch/ppc - good arch/alpha - fixed arch/mips - good arch/sparc64 - good arch/ia64 - good arch/arm - fixed arch/um - good arch/avr32 - good arch/h8300 - NA arch/m32r - good arch/v850 - good arch/frv - fixed arch/m68knommu - NA arch/arm26 - fixed arch/sh64 - fixed arch/xtensa - good Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/mm/fault.c2
-rw-r--r--arch/arm/mm/fault.c2
-rw-r--r--arch/arm26/mm/fault.c2
-rw-r--r--arch/cris/mm/fault.c2
-rw-r--r--arch/frv/mm/fault.c2
-rw-r--r--arch/m68k/mm/fault.c2
-rw-r--r--arch/parisc/mm/fault.c2
-rw-r--r--arch/sh64/mm/fault.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 8871529a34e2..8aa9db834c11 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -108,7 +108,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
108 108
109 /* If we're in an interrupt context, or have no user context, 109 /* If we're in an interrupt context, or have no user context,
110 we must not take the fault. */ 110 we must not take the fault. */
111 if (!mm || in_interrupt()) 111 if (!mm || in_atomic())
112 goto no_context; 112 goto no_context;
113 113
114#ifdef CONFIG_ALPHA_LARGE_VMALLOC 114#ifdef CONFIG_ALPHA_LARGE_VMALLOC
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 5e658a874498..9fd6d2eafb40 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -230,7 +230,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
230 * If we're in an interrupt or have no user 230 * If we're in an interrupt or have no user
231 * context, we must not take the fault.. 231 * context, we must not take the fault..
232 */ 232 */
233 if (in_interrupt() || !mm) 233 if (in_atomic() || !mm)
234 goto no_context; 234 goto no_context;
235 235
236 /* 236 /*
diff --git a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c
index a1f6d8a9cc32..93c0cee0fb5e 100644
--- a/arch/arm26/mm/fault.c
+++ b/arch/arm26/mm/fault.c
@@ -215,7 +215,7 @@ int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
215 * If we're in an interrupt or have no user 215 * If we're in an interrupt or have no user
216 * context, we must not take the fault.. 216 * context, we must not take the fault..
217 */ 217 */
218 if (in_interrupt() || !mm) 218 if (in_atomic() || !mm)
219 goto no_context; 219 goto no_context;
220 220
221 down_read(&mm->mmap_sem); 221 down_read(&mm->mmap_sem);
diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c
index 934c51078cce..c73e91f1299a 100644
--- a/arch/cris/mm/fault.c
+++ b/arch/cris/mm/fault.c
@@ -232,7 +232,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
232 * context, we must not take the fault.. 232 * context, we must not take the fault..
233 */ 233 */
234 234
235 if (in_interrupt() || !mm) 235 if (in_atomic() || !mm)
236 goto no_context; 236 goto no_context;
237 237
238 down_read(&mm->mmap_sem); 238 down_read(&mm->mmap_sem);
diff --git a/arch/frv/mm/fault.c b/arch/frv/mm/fault.c
index 8b3eb50c5105..3f12296c3688 100644
--- a/arch/frv/mm/fault.c
+++ b/arch/frv/mm/fault.c
@@ -78,7 +78,7 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear
78 * If we're in an interrupt or have no user 78 * If we're in an interrupt or have no user
79 * context, we must not take the fault.. 79 * context, we must not take the fault..
80 */ 80 */
81 if (in_interrupt() || !mm) 81 if (in_atomic() || !mm)
82 goto no_context; 82 goto no_context;
83 83
84 down_read(&mm->mmap_sem); 84 down_read(&mm->mmap_sem);
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c
index 911f2ce3f53e..2adbeb16e1b8 100644
--- a/arch/m68k/mm/fault.c
+++ b/arch/m68k/mm/fault.c
@@ -99,7 +99,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
99 * If we're in an interrupt or have no user 99 * If we're in an interrupt or have no user
100 * context, we must not take the fault.. 100 * context, we must not take the fault..
101 */ 101 */
102 if (in_interrupt() || !mm) 102 if (in_atomic() || !mm)
103 goto no_context; 103 goto no_context;
104 104
105 down_read(&mm->mmap_sem); 105 down_read(&mm->mmap_sem);
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index 64785e46f93b..641f9c920eee 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -152,7 +152,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
152 const struct exception_table_entry *fix; 152 const struct exception_table_entry *fix;
153 unsigned long acc_type; 153 unsigned long acc_type;
154 154
155 if (in_interrupt() || !mm) 155 if (in_atomic() || !mm)
156 goto no_context; 156 goto no_context;
157 157
158 down_read(&mm->mmap_sem); 158 down_read(&mm->mmap_sem);
diff --git a/arch/sh64/mm/fault.c b/arch/sh64/mm/fault.c
index 8e2f6c28b739..4f72ab33bb2b 100644
--- a/arch/sh64/mm/fault.c
+++ b/arch/sh64/mm/fault.c
@@ -154,7 +154,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
154 * If we're in an interrupt or have no user 154 * If we're in an interrupt or have no user
155 * context, we must not take the fault.. 155 * context, we must not take the fault..
156 */ 156 */
157 if (in_interrupt() || !mm) 157 if (in_atomic() || !mm)
158 goto no_context; 158 goto no_context;
159 159
160 /* TLB misses upon some cache flushes get done under cli() */ 160 /* TLB misses upon some cache flushes get done under cli() */