Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c23a4e96 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

[PATCH] iounmap debugging



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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent eda80228
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -228,6 +228,7 @@ EXPORT_SYMBOL(ioremap_nocache);
void iounmap(volatile void __iomem *addr)
void iounmap(volatile void __iomem *addr)
{
{
	struct vm_struct *p;
	struct vm_struct *p;

	if ((void __force *)addr <= high_memory)
	if ((void __force *)addr <= high_memory)
		return;
		return;


@@ -244,6 +245,7 @@ void iounmap(volatile void __iomem *addr)
	p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
	p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
	if (!p) { 
	if (!p) { 
		printk(KERN_WARNING "iounmap: bad address %p\n", addr);
		printk(KERN_WARNING "iounmap: bad address %p\n", addr);
		dump_stack();
		goto out_unlock;
		goto out_unlock;
	}
	}