kernel/debug-bad-pte-modules.patch

26 lines
931 B
Diff
Raw Normal View History

2013-04-16 18:38:04 +00:00
When we encounter a bad PTE, print out what modules were loaded,
so we can see if there is a common driver potentially at fault.
Signed-off-by: Dave Jones <davej@redhat.com>
diff -durpN '--exclude-from=/home/davej/.exclude' /home/davej/src/kernel/git-trees/linux/mm/memory.c linux-dj/mm/memory.c
--- /home/davej/src/kernel/git-trees/linux/mm/memory.c 2013-02-26 14:41:18.591116577 -0500
+++ linux-dj/mm/memory.c 2013-02-28 20:04:37.678304092 -0500
@@ -57,6 +57,7 @@
#include <linux/swapops.h>
#include <linux/elf.h>
#include <linux/gfp.h>
+#include <linux/module.h>
#include <linux/migrate.h>
#include <linux/string.h>
@@ -719,6 +722,7 @@ static void print_bad_pte(struct vm_area
if (vma->vm_file && vma->vm_file->f_op)
print_symbol(KERN_ALERT "vma->vm_file->f_op->mmap: %s\n",
(unsigned long)vma->vm_file->f_op->mmap);
+ print_modules();
dump_stack();
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
}