From patchwork Tue Feb 17 20:02:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 23329 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 79C83DDEEF for ; Wed, 18 Feb 2009 17:06:42 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1LZfY9-0002bz-2m; Wed, 18 Feb 2009 06:04:49 +0000 Received: from mail-gx0-f208.google.com ([209.85.217.208]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1LZW8y-00066b-O2 for linux-mtd@lists.infradead.org; Tue, 17 Feb 2009 20:02:15 +0000 Received: by gxk4 with SMTP id 4so4525640gxk.18 for ; Tue, 17 Feb 2009 12:02:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.151.144.15 with SMTP id w15mr1724659ybn.40.1234900931437; Tue, 17 Feb 2009 12:02:11 -0800 (PST) In-Reply-To: <1234601859.3564.95.camel@macbook.infradead.org> References: <200902112112.n1BLCKlR010256@imap1.linux-foundation.org> <20090212.093531.235975795.nemoto@toshiba-tops.co.jp> <20090211164247.8119de8d.akpm@linux-foundation.org> <1234601859.3564.95.camel@macbook.infradead.org> Date: Tue, 17 Feb 2009 15:02:11 -0500 Message-ID: <8bd0f97a0902171202i449ede68k3dd726039b4c2f4a@mail.gmail.com> Subject: Re: [patch for 2.6.29? 4/4] mtd/maps: blackfin async flash maps: fix up memory leak From: Mike Frysinger To: David Woodhouse X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Wed, 18 Feb 2009 01:04:46 -0500 Cc: Andrew Morton , linux-mtd@lists.infradead.org, Atsushi Nemoto , cooloney@kernel.org 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 On Sat, Feb 14, 2009 at 03:57, David Woodhouse wrote: > 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. i'm not entirely sure what the change is by reading that patch. what i've got is attached. -mike --- a/drivers/mtd/maps/bfin-async-flash.c +++ b/drivers/mtd/maps/bfin-async-flash.c @@ -41,4 +41,7 @@ uint32_t save_ambctl0, save_ambctl1; unsigned long irq_flags; +#ifdef CONFIG_MTD_PARTITIONS + struct mtd_partition *parts; +#endif }; @@ -167,4 +174,5 @@ pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n"); add_mtd_partitions(state->mtd, pdata->parts, ret); + state->parts = pdata->parts; } else if (pdata->nr_parts) { @@ -190,4 +198,5 @@ #ifdef CONFIG_MTD_PARTITIONS del_mtd_partitions(state->mtd); + kfree(state->parts); #endif map_destroy(state->mtd);