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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CC3DC4361B for ; Tue, 15 Dec 2020 19:09:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3861D22ADC for ; Tue, 15 Dec 2020 19:09:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3861D22ADC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To: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=XBjgsox+ZaHzgsGCnRCQerKBiXRcCWI/vRUQk6jXfhY=; b=tawEzSfSS3aUBG2HPVXRAhZ0C sdhsvRbjugrBCrvekfVR5fMGN5tzF3H2xBY10sp/DGqoex+JX88t3hCzZ7IG9cruBqBNdhe8ciJ/i 1VkUOtF+CAcaDKd7i2yEqr4D0Nznugr4Z0ziMXUzlpSB5RFJMzAyQrdWZexOUsxih4ynHnIUjorZK c6USLgA7TOKHmr3UCu9l5VLfD2YD1VqAFCvOHFyqn5hvsFxNIP6mLppJknVnu53BO4qE/NigSevZr CAXCN9qrn0C7Sjl9swDwL4Od4ZQ4ZsI0pEinL/VJx14nAVQ7Hv330l+gnOHSEOTXdBxFZWuZmvd25 hMhzZxeeQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpFgQ-0000ka-9G; Tue, 15 Dec 2020 19:08:26 +0000 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpFgO-0000k3-1z for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2020 19:08:25 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id BE7FB8EE; Tue, 15 Dec 2020 14:08:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 15 Dec 2020 14:08:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=dWCDLul9MYH7RotH8Fgke92fWSv SFd1KDNhizpPiBj0=; b=BQGtCAgB4FQ2bNAoERgLZgnZMC2kA//av80NLUSKqll RIuS3vrYeSbPhPAK5nAC7bnAFCGuLJhaJ3qJ2eaxOnJD7FMU/J38MnK4W2hr3iCh mc2+rPlFYRyqWfrdCVrKQw/e8g3EtiGCto8ERdFC5bgp8SkXAjMxkMAN90dMzNIe 9XP4c1NLlP0GI8TvOguMXb9cgw2kS/XlctgxREz9thMsHVhR2VGDIXCKOlOsRmqw hiKlK80FX2Vy5+YMx8BZRnRI+VYxuG+rq7712dY8MJjTYnOu7MnrdYL2NBNEfGYl Sd6kwkFGRLRmIscZpwGnJZlCZxaeq+uATSNkLiCLJWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=dWCDLu l9MYH7RotH8Fgke92fWSvSFd1KDNhizpPiBj0=; b=JKg7XgYmKzawST57za4gtI Dk2kWuEXLU1RyyBi+Yb6XAgDOL7Vr6GdtEzm4ucjTEHYHps8OOBEZnuhn5y2b8Qi DnESSfnaTTd1Y7VIzOxCwdvfUKmoCyqawoLLhbY+eyM/jYKEGmwTlib+l8h3t3tw DFvwuVFV5KP++ehGlVbxMebr95Y12kSyhYGsbXPcQKu0ymLUxq6pkAatbfB+OgL0 HVxQQZaRAlVkWYsrzI2u5iMBVx0Sd+riMXTMYWNWBWNFzoYV9vvk+xLFwTsuvtby 8L+jmiIiVIrN7oI8asEROMLv/bRxfHlkoj80/50rkZZ3BhKAKQqJ9weUZki61oOw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeltddguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeduvdduhfekkeehgffftefflefgffdtheffudffgeevteffheeuiedvvdej vdfgveenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id ACA0A1080067; Tue, 15 Dec 2020 14:08:16 -0500 (EST) Date: Tue, 15 Dec 2020 20:08:15 +0100 From: Maxime Ripard To: Christophe JAILLET Subject: Re: [PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function Message-ID: <20201215190815.6efzcqko55womf6b@gilmour> References: <20201214202117.146293-1-christophe.jaillet@wanadoo.fr> <20201215085655.ddacjfvogc3e33vz@gilmour> <20201215091153.GH2809@kadam> <20201215113710.wh4ezrvmqbpxd5yi@gilmour> <54194e3e-5eb1-d10c-4294-bac8f3933f47@wanadoo.fr> MIME-Version: 1.0 In-Reply-To: <54194e3e-5eb1-d10c-4294-bac8f3933f47@wanadoo.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201215_140824_360576_743ADA2F X-CRM114-Status: GOOD ( 22.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: song.bao.hua@hisilicon.com, jernej.skrabec@siol.net, f.fainelli@gmail.com, leon@kernel.org, timur@kernel.org, netdev@vger.kernel.org, wangyunjian@huawei.com, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, wens@csie.org, linux-arm-kernel@lists.infradead.org, kuba@kernel.org, sr@denx.de, davem@davemloft.net, Dan Carpenter , hkallweit1@gmail.com Content-Type: multipart/mixed; boundary="===============6046901835249245078==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6046901835249245078== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="np4pkv32spdrwk7i" Content-Disposition: inline --np4pkv32spdrwk7i Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 15, 2020 at 07:18:48PM +0100, Christophe JAILLET wrote: > Le 15/12/2020 =E0 12:37, Maxime Ripard a =E9crit=A0: > > On Tue, Dec 15, 2020 at 12:11:53PM +0300, Dan Carpenter wrote: > > > On Tue, Dec 15, 2020 at 09:56:55AM +0100, Maxime Ripard wrote: > > > > Hi, > > > >=20 > > > > On Mon, Dec 14, 2020 at 09:21:17PM +0100, Christophe JAILLET wrote: > > > > > 'irq_of_parse_and_map()' should be balanced by a corresponding > > > > > 'irq_dispose_mapping()' call. Otherwise, there is some resources = leaks. > > > >=20 > > > > Do you have a source to back that? It's not clear at all from the > > > > documentation for those functions, and couldn't find any user calli= ng it > > > > from the ten-or-so random picks I took. > > >=20 > > > It looks like irq_create_of_mapping() needs to be freed with > > > irq_dispose_mapping() so this is correct. > >=20 > > The doc should be updated first to make that clear then, otherwise we're > > going to fix one user while multiples will have poped up > >=20 > > Maxime > >=20 >=20 > Hi, >=20 > as Dan explained, I think that 'irq_dispose_mapping()' is needed because = of > the 'irq_create_of_mapping()" within 'irq_of_parse_and_map()'. >=20 > As you suggest, I'll propose a doc update to make it clear and more future > proof. Thanks :) And if you feel like it, a coccinelle script would be awesome too so that other users get fixed over time Maxime --np4pkv32spdrwk7i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX9kJngAKCRDj7w1vZxhR xR6iAQCYBl0k0FS3O7aaMjiuDMcw+buQelECZ8B6EltdifEEfAD/a3yu9LamvXJd ZntPs+j60NZcjdM7PuWbJiXL+590ig8= =++pp -----END PGP SIGNATURE----- --np4pkv32spdrwk7i-- --===============6046901835249245078== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6046901835249245078==--