* [PATCH] - linux/arch/ia64/kernel/acpi.c
@ 2003-12-18 19:14 Jack Steiner
2003-12-19 23:10 ` David Mosberger
0 siblings, 1 reply; 2+ messages in thread
From: Jack Steiner @ 2003-12-18 19:14 UTC (permalink / raw)
To: linux-ia64
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.
--- linux.base/arch/ia64/kernel/acpi.c Wed Nov 26 14:44:07 2003
+++ linux/arch/ia64/kernel/acpi.c Thu Dec 18 13:10:03 2003
@@ -413,7 +413,7 @@
break;
}
if (p < pend) {
- for (q = pend; q >= p; q--)
+ for (q = pend-1; q >= p; q--)
*(q + 1) = *q;
}
p->start_paddr = paddr;
--
Thanks
Jack Steiner (steiner@sgi.com) 651-683-5302
Principal Engineer SGI - Silicon Graphics, Inc.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] - linux/arch/ia64/kernel/acpi.c
2003-12-18 19:14 [PATCH] - linux/arch/ia64/kernel/acpi.c Jack Steiner
@ 2003-12-19 23:10 ` David Mosberger
0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2003-12-19 23:10 UTC (permalink / raw)
To: linux-ia64
>>>>> On Thu, 18 Dec 2003 13:14:42 -0600, Jack Steiner <steiner@sgi.com> said:
Jack> The code in acpi_numa_memory_affinity_init that sorts the
Jack> node_memblk can overrun the array & clobber the memory that
Jack> follows the end of the array. The error will be seen only on
Jack> systems that fill the node_memblk array and only if SAL doesnt
Jack> sort the entries in the SRAT.
> --- linux.base/arch/ia64/kernel/acpi.c Wed Nov 26 14:44:07 2003
> +++ linux/arch/ia64/kernel/acpi.c Thu Dec 18 13:10:03 2003
> @@ -413,7 +413,7 @@
> break;
> }
> if (p < pend) {
> - for (q = pend; q >= p; q--)
> + for (q = pend - 1; q >= p; q--)
> *(q + 1) = *q;
> }
> p->start_paddr = paddr;
Looks correct to me. Applied.
--david
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-19 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-18 19:14 [PATCH] - linux/arch/ia64/kernel/acpi.c Jack Steiner
2003-12-19 23:10 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox