From patchwork Wed Oct 15 04:40:19 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 4564 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id A524FDDED9 for ; Wed, 15 Oct 2008 15:41:34 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1030) id 584D6DDDFB; Wed, 15 Oct 2008 15:40:56 +1100 (EST) To: From: Benjamin Herrenschmidt Date: Wed, 15 Oct 2008 15:40:19 +1100 Subject: [PATCH] edac/cell: Fix incorrect edac_mode in csrow causing oops Message-Id: <20081015044057.584D6DDDFB@ozlabs.org> Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, mniyer@us.ibm.com X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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 --- drivers/edac/cell_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-work.orig/drivers/edac/cell_edac.c 2008-10-15 15:35:21.000000000 +1100 +++ linux-work/drivers/edac/cell_edac.c 2008-10-15 15:35:29.000000000 +1100 @@ -142,7 +142,7 @@ static void __devinit cell_edac_init_csr 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",