This is a note to let you know that I've just added the patch titled

    mtd: pxa3xx_nand: NULL dereference in pxa3xx_nand_probe

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mtd-pxa3xx_nand-null-dereference-in-pxa3xx_nand_probe.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 52d039fdaa78c5a9f9bc2940ad58d7ed76b8336d Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Thu, 6 Jan 2011 17:05:36 +0300
Subject: mtd: pxa3xx_nand: NULL dereference in pxa3xx_nand_probe

From: Dan Carpenter <[email protected]>

commit 52d039fdaa78c5a9f9bc2940ad58d7ed76b8336d upstream.

"info->cmdset" gets dereferenced in __readid() so it needs to be
initialized earlier in the function.  This bug was introduced in
18c81b1828f8 "mtd: pxa3xx_nand: remove the flash info in driver
structure".

Reported-and-tested-by: Sven Neumann <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/mtd/nand/pxa3xx_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -885,6 +885,7 @@ static int pxa3xx_nand_detect_config(str
        /* set info fields needed to __readid */
        info->read_id_bytes = (info->page_size == 2048) ? 4 : 2;
        info->reg_ndcr = ndcr;
+       info->cmdset = &default_cmdset;
 
        if (__readid(info, &id))
                return -ENODEV;
@@ -915,7 +916,6 @@ static int pxa3xx_nand_detect_config(str
 
        info->ndtr0cs0 = nand_readl(info, NDTR0CS0);
        info->ndtr1cs0 = nand_readl(info, NDTR1CS0);
-       info->cmdset = &default_cmdset;
 
        return 0;
 }


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.37/mtd-pxa3xx_nand-null-dereference-in-pxa3xx_nand_probe.patch
queue-2.6.37/staging-beceem-add-usb-id-for-bcsm250-mobile-wimax.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to