]> git.hungrycats.org Git - linux/commitdiff
edac cell: fix incorrect edac_mode
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 20 Oct 2008 16:50:07 +0000 (16:50 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 10 Nov 2008 19:17:52 +0000 (11:17 -0800)
commit 3b274f44d2ca05f719fe39947b6a5293a2dbd8fd upstream

The cell_edac driver is setting the edac_mode field of the csrow's to an
incorrect value, causing the sysfs show routine for that field to go out
of an array bound and Oopsing the kernel when used.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/edac/cell_edac.c

index b54112ffd28282dd04eed8ffd243c7685c7d10df..00b8539aa24bc62bc90d8ce31084424c58c80807 100644 (file)
@@ -141,7 +141,7 @@ static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci)
                csrow->nr_pages = (r.end - r.start + 1) >> PAGE_SHIFT;
                csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
                csrow->mtype = MEM_XDR;
-               csrow->edac_mode = EDAC_FLAG_EC | EDAC_FLAG_SECDED;
+               csrow->edac_mode = EDAC_SECDED;
                dev_dbg(mci->dev,
                        "Initialized on node %d, chanmask=0x%x,"
                        " first_page=0x%lx, nr_pages=0x%x\n",