Skip to content

Commit

Permalink
[PATCH] iounmap debugging
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jul 8, 2005
1 parent eda8022 commit c23a4e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/i386/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand All @@ -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;
}

Expand Down

0 comments on commit c23a4e9

Please sign in to comment.