Commit ea361e05 authored by Jack Steiner's avatar Jack Steiner Committed by David Mosberger

[PATCH] ia64: prevent buffer-overrun in acpi_numa_memory_affinity_init()

The code in acpi_numa_memory_affinity_init that sorts the node_memblk
can overrun the array & clobber the memory that follows the end of the
array. The error will be seen only on systems that fill the
node_memblk array and only if SAL doesnt sort the entries in the SRAT.
parent ecd77a50
......@@ -413,7 +413,7 @@ acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma)
break;
}
if (p < pend) {
for (q = pend; q >= p; q--)
for (q = pend - 1; q >= p; q--)
*(q + 1) = *q;
}
p->start_paddr = paddr;
......
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