From patchwork Mon Dec 1 12:28:18 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev" X-Patchwork-Id: 11568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 62F85DDDEE for ; Mon, 1 Dec 2008 23:30:51 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L77tq-0003dU-E9; Mon, 01 Dec 2008 12:29:14 +0000 Received: from mailhub.sw.ru ([195.214.232.25] helo=relay.sw.ru) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1L77to-0002G1-IY for linux-mtd@lists.infradead.org; Mon, 01 Dec 2008 12:29:12 +0000 Received: from [10.30.1.9] ([10.30.1.9]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id mB1CSCgP014896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Dec 2008 15:28:13 +0300 (MSK) Subject: [PATCH, resend] mtd: OOPS accessing flash operations over STM flash on PXA From: "Denis V. Lunev" To: Andrew Morton X-Greylist: Sender e-mail whitelisted, not delayed by milter-greylist-2.0.2 (vzorg.swsoft.net [64.131.90.7]); Mon, 17 Nov 2008 04:23:15 -0500 (EST) Organization: Parallels Date: Mon, 01 Dec 2008 15:28:18 +0300 Message-Id: <1228134498.10480.16.camel@iris.sw.ru> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-Spam-Score: 0.0 (/) Cc: "Denis V. Lunev" , ymiao3@marvell.com, linux-mtd@lists.infradead.org, dwmw2@infradead.org, linux-kernel X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org STM 2Gb flash is a large-page NAND flash. Set operations accordingly. This field is dereferrenced without a check in several places resulting in OOPS. Signed-off-by: Denis V. Lunev Acked-by: Eric Miao --- drivers/mtd/nand/pxa3xx_nand.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index c0fa9c9..15f0a26 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -269,6 +269,7 @@ static struct pxa3xx_nand_timing stm2GbX16_timing = { static struct pxa3xx_nand_flash stm2GbX16 = { .timing = &stm2GbX16_timing, + .cmdset = &largepage_cmdset, .page_per_block = 64, .page_size = 2048, .flash_width = 16,