linux/drivers/edac
Andrew Morton 168bfeef7b amd64_edac:__amd64_set_scrub_rate(): avoid overindexing scrubrates[]
If none of the elements in scrubrates[] matches, this loop will cause
__amd64_set_scrub_rate() to incorrectly use the n+1th element.

As the function is designed to use the final scrubrates[] element in the
case of no match, we can fix this bug by simply terminating the array
search at the n-1th element.

Boris: this code is fragile anyway, see here why:
http://marc.info/?l=linux-kernel&m=135102834131236&w=2

It will be rewritten more robustly soonish.

Reported-by: Denis Kirjanov <kirjanov@gmail.com>
Cc: stable@vger.kernel.org
Cc: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
2012-10-24 16:13:27 +02:00
..
amd64_edac.c amd64_edac:__amd64_set_scrub_rate(): avoid overindexing scrubrates[] 2012-10-24 16:13:27 +02:00
amd64_edac.h
amd64_edac_dbg.c
amd64_edac_inj.c
amd76x_edac.c
amd8111_edac.c
amd8111_edac.h
amd8131_edac.c
amd8131_edac.h
cell_edac.c
cpc925_edac.c
e7xxx_edac.c
e752x_edac.c
edac_core.h
edac_device.c
edac_device_sysfs.c
edac_mc.c Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
edac_mc_sysfs.c
edac_module.c
edac_module.h
edac_pci.c
edac_pci_sysfs.c
edac_stub.c
highbank_l2_edac.c
highbank_mc_edac.c
i7core_edac.c
i3000_edac.c
i3200_edac.c i3200_edac: Fix memory rank size 2012-09-25 07:32:33 -03:00
i5000_edac.c i5000: Fix the memory size calculation with 2R memories 2012-09-25 07:38:19 -03:00
i5100_edac.c
i5400_edac.c
i7300_edac.c
i82443bxgx_edac.c
i82860_edac.c
i82875p_edac.c
i82975x_edac.c
Kconfig
Makefile
mce_amd.c
mce_amd.h
mce_amd_inj.c
mpc85xx_edac.c
mpc85xx_edac.h
mv64x60_edac.c
mv64x60_edac.h
pasemi_edac.c
ppc4xx_edac.c
ppc4xx_edac.h
r82600_edac.c
sb_edac.c sb_edac: Avoid overflow errors at memory size calculation 2012-09-25 07:38:20 -03:00
tile_edac.c
x38_edac.c