From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD50ACF3183 for ; Tue, 1 Oct 2024 20:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To :Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7fnSGYhniQwLAJoqqmgeDP6zdAognPdAB/UHbLqgj10=; b=QBzmj3xTAxyXfWx8MSvC2PgUAc RvcrhHlQ/XmuKyjMwb0K0RHZf9LNdkAN+72s8nvOYDdlyTd2+LoitXtSgqMOrnnLtIunWlEKEZSDm dvONQE0L6DNuXkNU4Qqypn7bGTXM2GTrQWTG2lR+XXIgBa6saDjoezihIyGmO6b5Byg9dhnOGxMCa DFS3bYItdDVJqMSXG7Eq7qakoy2n9cBz6mVIE2LodQnraW/IelJ83rHDaWVw30YVY1SnfB1JZvMkd oPVoJiudkV13gsuP20ne7ajaBBTDMx2Gp7QTH62jEE8RJCw2t+V32B4i2BR69AXGnyQcsTDy/ukwF dooK/bYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svjdq-000000041CN-27r0; Tue, 01 Oct 2024 20:38:42 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svjcb-0000000414M-3olo; Tue, 01 Oct 2024 20:37:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=Content-Type:MIME-Version:Message-ID:Subject:From:Date:From :Subject; bh=7fnSGYhniQwLAJoqqmgeDP6zdAognPdAB/UHbLqgj10=; b=nwQ9EuUczb92u4w9 OxhpSgqKBefhixFpJfhHESG9v2gP0xrDG4pfFb8At2gpuq9hXgrIOtgl6qrjGyT5s39I+Y6QCQY6X 7lv4o/A/K1m0TnOm8cUnQq7TtDf+0iOlp/udMQ211uEH4rp6Dg6A7ooHpWO41uZuyk6Esskm51emU zDxDaipqvy++8DHQiDWlS5pdZPCHes7IV6fti+RsWiJIcuc1mepUwkUHNxsVhhomju+voXmveHG/F ACGFonZ8pAOtDedSuViBhxENqhrQPhcINwRRNFgBoU07MJ0sWd5eFZt8Bv6l4ZIgyTAmptrZDBD6f mXtk7m27mP9tPrEb1A==; Received: from dg by mx.treblig.org with local (Exim 4.96) (envelope-from ) id 1svjcU-008Jvz-3A; Tue, 01 Oct 2024 20:37:18 +0000 Date: Tue, 1 Oct 2024 20:37:18 +0000 From: "Dr. David Alan Gilbert" To: Boris Brezillon Subject: Re: of atmel_pmecc_destroy_user Message-ID: References: <20240930090817.0a86e538@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20240930090817.0a86e538@collabora.com> X-Chocolate: 70 percent or better cocoa solids preferably X-Operating-System: Linux/6.1.0-21-amd64 (x86_64) X-Uptime: 20:36:38 up 146 days, 7:50, 1 user, load average: 0.00, 0.00, 0.00 User-Agent: Mutt/2.2.12 (2023-09-09) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_133726_059227_DCB8E1C6 X-CRM114-Status: GOOD ( 21.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard@nod.at, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Boris Brezillon (boris.brezillon@collabora.com) wrote: > Hi David, > > On Sun, 29 Sep 2024 17:05:01 +0000 > "Dr. David Alan Gilbert" wrote: > > > Hi Boris and co, > > One of my scripts noticed that 'atmel_pmecc_destroy_user' > > isn't called anywhere; I was going to delete it, but hmm, I wonder > > if it's actually a missing call and leaking (in the unlikely case > > the device was ever removed). > > > > It was added by your: > > commit f88fc122cc34c2545dec9562eaab121494e401ef > > Author: Boris Brezillon > > Date: Thu Mar 16 09:02:40 2017 +0100 > > > > mtd: nand: Cleanup/rework the atmel_nand driver > > > > and I see the allocation in: > > user = kzalloc(size, GFP_KERNEL); > > in > > nand->pmecc = atmel_pmecc_create_user(nc->pmecc, &req); > > called in atmel_nand_pmecc_init > > from atmel_nand_ecc_init > > from atmel_hsmc_nand_ecc_init > > > > But I don't see any freeing. > > > > (I don't knowingly have hardware to test a fix, although I guess > > there's probably one somewhere....) > > > > Suggestions? > > There's definitely a leak. I haven't looked at NAND stuff for a while > though, so I'll let Miquel advise you on where > atmel_pmecc_destroy_user() should be called. I see Miquel has posted a fix. Thanks to both of you! Dave > Regards, > > Boris > -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/