Skip to contentSkip to conversation

amd64_edac: index not within bounds in amd64_get_scrub_rate()

PATCH Applied Roel Kluin 2 participants 2 messages Jan 11, 2010 – Jan 12, 2010

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 amd64_edac: index not within bounds in amd64_get_scrub_rate()

Ensure index stays within bound in amd64_get_scrub_rate()

---

drivers/edac/amd64_edac.c +1 -1
index c5facd9..000dc67 100644
@@ -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;
#1 lore raw
Quoted 3 lines · Roel Kluin

Ensure index stays within bound in amd64_get_scrub_rate()

Applied, thanks.

Signature · 8 lines
Regards/Gruss,
Boris.

Operating | Advanced Micro Devices GmbH
  System  | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
 Research | Geschäftsführer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
  (OSRC)  | Registergericht München, HRB Nr. 43632