diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-02 17:39:11 +0200 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-02 17:39:11 +0200 |
commit | 1c3f45ab2f7f879ea482501c83899505c31f7539 (patch) | |
tree | 672465b3b9b3e2e26a8caf74ed64aa6885c52c13 /arch/i386/mm/ioremap.c | |
parent | AUDIT: Fix user pointer deref thinko in sys_socketcall(). (diff) | |
parent | Merge of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 (diff) | |
download | linux-1c3f45ab2f7f879ea482501c83899505c31f7539.tar.xz linux-1c3f45ab2f7f879ea482501c83899505c31f7539.zip |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/i386/mm/ioremap.c')
-rw-r--r-- | arch/i386/mm/ioremap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c index db06f7399913..ab542792b27b 100644 --- a/arch/i386/mm/ioremap.c +++ b/arch/i386/mm/ioremap.c @@ -238,19 +238,21 @@ void iounmap(volatile void __iomem *addr) addr < phys_to_virt(ISA_END_ADDRESS)) return; - p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr)); + write_lock(&vmlist_lock); + p = __remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr)); if (!p) { - printk("__iounmap: bad address %p\n", addr); - return; + printk("iounmap: bad address %p\n", addr); + goto out_unlock; } if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) { - /* p->size includes the guard page, but cpa doesn't like that */ change_page_attr(virt_to_page(__va(p->phys_addr)), p->size >> PAGE_SHIFT, PAGE_KERNEL); global_flush_tlb(); } +out_unlock: + write_unlock(&vmlist_lock); kfree(p); } |