Commit 8ca94293 authored by Alex Williamson's avatar Alex Williamson Committed by David Mosberger

[PATCH] ia64: trashing bootmem on non-NUMA boxes

call_pernode_memory() is rounding memory regions to page boundaries,
but in the non-NUMA case, it's incorrectly passing the rounded start and
the original length.  Any reserved memory regions sitting beyond a
memory region that isn't nicely aligned is potentially at risk for
getting freed and trashed.  This is a fairly nasty bug that can bite in
very hard to find ways.  In my case, the EFI memory map was getting
overwritten, causing the ACPI methods to access chipset registers
cachable instead of uncachable.  It could potentially be causing some of
the random hangs and strange behavior we're seeing lately.
Signed-off-by: default avatarAlex Williamson <alex.williamson@hp.com>
Signed-off-by: default avatarDavid Mosberger <davidm@hpl.hp.com>
parent dbe1950e
......@@ -549,7 +549,7 @@ void call_pernode_memory(unsigned long start, unsigned long len, void *arg)
if (!num_node_memblks) {
/* No SRAT table, so assume one node (node 0) */
if (start < end)
(*func)(start, len, 0);
(*func)(start, end - start, 0);
return;
}
......
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