[PATCH 1/2] mtd/nand : don't free the global data fsl_lbc_ctrl_dev->nand in fsl_elbc_chip_remove()
dedekind1 at gmail.com
Fri Jul 1 15:40:21 EST 2011
On Thu, 2011-06-30 at 11:26 -0500, Scott Wood wrote:
> If the NULL assignment is dropped, consider what happens if the
> fsl_elbc_nand module is removed then reinserted. On reinsertion, it
> see a non-NULL fsl_lbc_ctrl_dev->nand, and will skip allocating a new
> Then you're referencing freed memory.
Oh, then this sounds like a separate bug. Removing the module should
kill everything, and re-inserging the module should have zero
dependencies on the previous states...
Anyway, if you think the original patch is OK, I can put it to my tree.
More information about the Linuxppc-dev