]> err.no Git - linux-2.6/commitdiff
[PATCH] iounmap debugging
authorAndrew Morton <akpm@osdl.org>
Fri, 8 Jul 2005 00:56:02 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 8 Jul 2005 01:23:35 +0000 (18:23 -0700)
We get sporadic reports of `__iounmap: bad address' coming out.  Add a
dump_stack() to find the culprit.

Try to identify which subsystem is having iounmap() problems.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/mm/ioremap.c

index 6b25afc933b605b0f515372d900cdc272ffc2e71..f379b8d675585eac6e6884887fc1a1a9b5230624 100644 (file)
@@ -228,7 +228,8 @@ EXPORT_SYMBOL(ioremap_nocache);
 void iounmap(volatile void __iomem *addr)
 {
        struct vm_struct *p;
-       if ((void __force *) addr <= high_memory) 
+
+       if ((void __force *)addr <= high_memory)
                return;
 
        /*
@@ -241,9 +242,10 @@ void iounmap(volatile void __iomem *addr)
                return;
 
        write_lock(&vmlist_lock);
-       p = __remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr));
+       p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
        if (!p) { 
                printk(KERN_WARNING "iounmap: bad address %p\n", addr);
+               dump_stack();
                goto out_unlock;
        }