Message ID | 200902112112.n1BLCKlR010256@imap1.linux-foundation.org |
---|---|
State | New, archived |
Headers | show |
On Wed, 11 Feb 2009 13:12:19 -0800, akpm@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. --- Atsushi Nemoto
On Thu, 12 Feb 2009 09:35:31 +0900 (JST) Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote: > On Wed, 11 Feb 2009 13:12:19 -0800, akpm@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..
On Wed, 2009-02-11 at 16:42 -0800, Andrew Morton wrote: > > > > > 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.. Er, wasn't your [1/4] actually Nemoto-san's latest physmap patch? Mike, please can I have an updated version of the blackfin patch? Nemoto-san, thank you for taking care of this.
diff -puN drivers/mtd/maps/bfin-async-flash.c~mtd-maps-blackfin-async-flash-maps-fix-up-memory-leak drivers/mtd/maps/bfin-async-flash.c --- a/drivers/mtd/maps/bfin-async-flash.c~mtd-maps-blackfin-async-flash-maps-fix-up-memory-leak +++ a/drivers/mtd/maps/bfin-async-flash.c @@ -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");