]> git.hungrycats.org Git - linux/commitdiff
[PATCH] x86-64: Fix use of uninitialized memory in ioremap
authorAndi Kleen <ak@suse.de>
Tue, 15 Jun 2004 01:01:58 +0000 (18:01 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 15 Jun 2004 01:01:58 +0000 (18:01 -0700)
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
From: "Kamble, Nitin A" <nitin.a.kamble@intel.com>

Fix use of uninitialized memory in x86-64 ioremap

This caused BUGs at bootup for some people.

arch/x86_64/mm/ioremap.c

index 8d1cb38a0818d759b3ae683a6c3611bd256a3868..0cc4a612fb25f21f6e4b468bce7dedc771dea8ed 100644 (file)
@@ -158,6 +158,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
        area = get_vm_area(size, VM_IOREMAP);
        if (!area)
                return NULL;
+       area->phys_addr = phys_addr;
        addr = area->addr;
        if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) {
                vunmap(addr);