aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-12-31 07:35:57 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-12-31 07:35:57 -0500
commit2ca1a615835d9f4990f42102ab1f2ef434e7e89c (patch)
tree726cf3d5f29a6c66c44e4bd68e7ebed2fd83d059 /mm/memory.c
parente12f0102ac81d660c9f801d0a0e10ccf4537a9de (diff)
parent6a94cb73064c952255336cc57731904174b2c58f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: arch/x86/kernel/io_apic.c
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index f01b7eed6e16..0a2010a9518c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3075,3 +3075,18 @@ void print_vma_addr(char *prefix, unsigned long ip)
3075 } 3075 }
3076 up_read(&current->mm->mmap_sem); 3076 up_read(&current->mm->mmap_sem);
3077} 3077}
3078
3079#ifdef CONFIG_PROVE_LOCKING
3080void might_fault(void)
3081{
3082 might_sleep();
3083 /*
3084 * it would be nicer only to annotate paths which are not under
3085 * pagefault_disable, however that requires a larger audit and
3086 * providing helpers like get_user_atomic.
3087 */
3088 if (!in_atomic() && current->mm)
3089 might_lock_read(&current->mm->mmap_sem);
3090}
3091EXPORT_SYMBOL(might_fault);
3092#endif