]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Print backtrace for bad vfree()
authorAndrew Morton <akpm@osdl.org>
Thu, 27 May 2004 00:36:36 +0000 (17:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 27 May 2004 00:36:36 +0000 (17:36 -0700)
From: Andi Kleen <ak@suse.de>

Only the printk alone is not too useful, print the backtrace too.

Signed-off-by: Andrew Morton <akpm@osdl.org>
mm/vmalloc.c

index c7f7018278b43deef91770a8eeddfe9dbda02493..16e6f88c23ab5af3c89179ffa468def4f2be8c3a 100644 (file)
@@ -284,6 +284,7 @@ void __vunmap(void *addr, int deallocate_pages)
 
        if ((PAGE_SIZE-1) & (unsigned long)addr) {
                printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
+               WARN_ON(1);
                return;
        }
 
@@ -291,6 +292,7 @@ void __vunmap(void *addr, int deallocate_pages)
        if (unlikely(!area)) {
                printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
                                addr);
+               WARN_ON(1);
                return;
        }