diff options
| author | 2008-12-13 21:55:51 +1030 | |
|---|---|---|
| committer | 2008-12-13 21:55:51 +1030 | |
| commit | 968ea6d80e395cf11a51143cfa1b9a14ada676df (patch) | |
| tree | dc2acec8c9bdced33afe1e273ee5e0b0b93d2703 /mm/memory.c | |
| parent | cpumask: Use all NR_CPUS bits unless CONFIG_CPUMASK_OFFSTACK (diff) | |
| parent | Merge branches 'irq/sparseirq', 'x86/quirks' and 'x86/reboot' into cpus4096 (diff) | |
| download | wireguard-linux-968ea6d80e395cf11a51143cfa1b9a14ada676df.tar.xz wireguard-linux-968ea6d80e395cf11a51143cfa1b9a14ada676df.zip | |
Merge ../linux-2.6-x86
Conflicts:
arch/x86/kernel/io_apic.c
kernel/sched.c
kernel/sched_stats.h
Diffstat (limited to 'mm/memory.c')
| -rw-r--r-- | mm/memory.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index 164951c47305..fc031d68327e 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3049,3 +3049,18 @@ void print_vma_addr(char *prefix, unsigned long ip) } up_read(¤t->mm->mmap_sem); } + +#ifdef CONFIG_PROVE_LOCKING +void might_fault(void) +{ + might_sleep(); + /* + * it would be nicer only to annotate paths which are not under + * pagefault_disable, however that requires a larger audit and + * providing helpers like get_user_atomic. + */ + if (!in_atomic() && current->mm) + might_lock_read(¤t->mm->mmap_sem); +} +EXPORT_SYMBOL(might_fault); +#endif |
