[PATCH] x86_64: Don't look up struct page pointer of physical address in iounmap
authorAndi Kleen <ak@suse.de>
Tue, 17 May 2005 04:53:24 +0000 (21:53 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 17 May 2005 14:59:14 +0000 (07:59 -0700)
It could be in a memory hole not mapped in mem_map and that causes the hash
lookup to go off to nirvana.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/mm/ioremap.c

index 74ec8554b195de6c5a9b87ce5d39f08d9c5da544..c6fb0cb69992bbf14a2f42d4ddde10b298cd9316 100644 (file)
@@ -272,7 +272,7 @@ void iounmap(volatile void __iomem *addr)
        if ((p->flags >> 20) &&
                p->phys_addr + p->size - 1 < virt_to_phys(high_memory)) {
                /* p->size includes the guard page, but cpa doesn't like that */
-               change_page_attr(virt_to_page(__va(p->phys_addr)),
+               change_page_attr_addr((unsigned long)__va(p->phys_addr),
                                 p->size >> PAGE_SHIFT,
                                 PAGE_KERNEL);
                global_flush_tlb();