[patch for 2.6.29? 4/4] mtd/maps: blackfin async flash maps: fix up memory leak

Andrew Morton akpm at linux-foundation.org
Wed Feb 11 19:42:47 EST 2009


On Thu, 12 Feb 2009 09:35:31 +0900 (JST)
Atsushi Nemoto <anemo at mba.ocn.ne.jp> wrote:

> On Wed, 11 Feb 2009 13:12:19 -0800, akpm at linux-foundation.org wrote:
> > @@ -170,6 +170,7 @@ static int __devinit bfin_flash_probe(st
> >  	if (ret > 0) {
> >  		pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n");
> >  		add_mtd_partitions(state->mtd, pdata->parts, ret);
> > +		kfree(pdata->parts);
> >  
> >  	} else if (pdata->nr_parts) {
> >  		pr_devinit(KERN_NOTICE DRIVER_NAME ": Using board partition definition\n");
> 
> As Matthias Kaehlcke pointed out in mail titled "[BUG]
> physmap_flash_probe() frees memory still in use", this fix introduce
> another bug.
> 
> Revised patch for physmap driver is:
> http://lists.infradead.org/pipermail/linux-mtd/2009-February/024590.html
> 
> Mike, please update this blackfin patch too.
> 

I don't have a copy of that patch.  You're on you own, guys..



More information about the linux-mtd mailing list