Commit 3b15e36b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Print backtrace for bad vfree()

From: Andi Kleen <ak@suse.de>

Only the printk alone is not too useful, print the backtrace too.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 39d51810
...@@ -284,6 +284,7 @@ void __vunmap(void *addr, int deallocate_pages) ...@@ -284,6 +284,7 @@ void __vunmap(void *addr, int deallocate_pages)
if ((PAGE_SIZE-1) & (unsigned long)addr) { if ((PAGE_SIZE-1) & (unsigned long)addr) {
printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr); printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
WARN_ON(1);
return; return;
} }
...@@ -291,6 +292,7 @@ void __vunmap(void *addr, int deallocate_pages) ...@@ -291,6 +292,7 @@ void __vunmap(void *addr, int deallocate_pages)
if (unlikely(!area)) { if (unlikely(!area)) {
printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n", printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
addr); addr);
WARN_ON(1);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment