Commit 71279d2b authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86-64: Fix use of uninitialized memory in ioremap

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.
parent b8622ab6
...@@ -158,6 +158,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag ...@@ -158,6 +158,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
area = get_vm_area(size, VM_IOREMAP); area = get_vm_area(size, VM_IOREMAP);
if (!area) if (!area)
return NULL; return NULL;
area->phys_addr = phys_addr;
addr = area->addr; addr = area->addr;
if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) {
vunmap(addr); vunmap(addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment