public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] amd64_edac: index not within bounds in amd64_get_scrub_rate()
@ 2010-01-11 19:58 Roel Kluin
  2010-01-12 18:19 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-01-11 19:58 UTC (permalink / raw)
  To: Andrew Morton, LKML, borislav.petkov, dougthompson

Ensure index stays within bound in amd64_get_scrub_rate()

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index c5facd9..000dc67 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -197,7 +197,7 @@ static int amd64_get_scrub_rate(struct mem_ctl_info *mci, u32 *bw)
 	edac_printk(KERN_DEBUG, EDAC_MC,
 		    "pci-read, sdram scrub control value: %d \n", scrubval);
 
-	for (i = 0; ARRAY_SIZE(scrubrates); i++) {
+	for (i = 0; i < ARRAY_SIZE(scrubrates); i++) {
 		if (scrubrates[i].scrubval == scrubval) {
 			*bw = scrubrates[i].bandwidth;
 			status = 0;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-12 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 19:58 [PATCH] amd64_edac: index not within bounds in amd64_get_scrub_rate() Roel Kluin
2010-01-12 18:19 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox