summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-31 08:14:29 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-31 08:14:29 +0100
commit5fdf7e5975a0b0f6a0370655612c5dca3fd6311b (patch)
tree639c536e818c6ace974aa285ba94576df0353b01 /mm/memory.c
parent7a51cffbd10886c0557677dd916c090097c691ef (diff)
parent6a94cb73064c952255336cc57731904174b2c58f (diff)
downloadtalos-obmc-linux-5fdf7e5975a0b0f6a0370655612c5dca3fd6311b.tar.gz
talos-obmc-linux-5fdf7e5975a0b0f6a0370655612c5dca3fd6311b.zip
Merge branch 'linus' into tracing/kmemtrace
Conflicts: mm/slub.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)
}
up_read(&current->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(&current->mm->mmap_sem);
+}
+EXPORT_SYMBOL(might_fault);
+#endif
OpenPOWER on IntegriCloud