Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp868820ybz; Wed, 29 Apr 2020 10:47:57 -0700 (PDT) X-Google-Smtp-Source: APiQypJC2DiGc+O5WTOAvKuzOFKwh2ZEYDnyy6Icf2MQmviQiuXLtfrE8pBXnafH7tMojRqGtAPF X-Received: by 2002:a05:6402:356:: with SMTP id r22mr3781997edw.3.1588182477346; Wed, 29 Apr 2020 10:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588182477; cv=none; d=google.com; s=arc-20160816; b=uW26QtYjCGLKwgT2wkvnASIPfempYtROW//0e2KSZ4OSkeoH55Yi5799REjnk4KwF7 SX0pg5/tr0QuVF769QF7QhOLyeJ8n+p2o2OBNBT5sFvXbfUlE+M32yBgkEFkT4BBW7c+ RqQ9dshSYDh1jH1V9P6KcHePorn07x+BR+fMXFgfdG1LJY058yP5GE+w2d42z1FHapEb ml2Xjmqw6MNEJ7pl+f4oZAytEvgZeNCPTVXNRL9HJs/03l0xwqGnud5xrAfhUvu1PEPV 33p+2Ci5DhLF1egDAWfsvQ+r5LqakfP8fgY7uyKGuPOP5HG7ojkLKUdUvypFqKNyAEun 41HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=eC8iaDbgklls5vEW6hsS6u3vGO3A7JOSp8YigJew5EA=; b=blrANq7lHeOI5P0DQ4g1FDrdVzLUXTUAb6r8J9TAzaV3mMtDu4ntjVx6ovDXcLITcu M7PxUSCEnzVWpNjnwd/u8C2LDKzKZ/nPzVzRzCzli6DsrtdTBCsppaunlfYfJhxC3udE um1IvGUk7Rb/FBq0wKAStM0OhGZLcr32y96c0bqw07VEVq4jFEPrq0hBOIsnoMWYdTr4 cTWB7whCyRXiy/to4SswlQcfckWhw49tAl/XZoMmYJW/sERkS6czDO2NRftS/pCyVyrB geKozKUQ9HuoJujepEKh1ZZbLBNOJFj9KoDiTH/1bEad8TBWPhgQRq2OC7F+miEvLRlw k1yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=bvclRFDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si3897095edv.443.2020.04.29.10.47.32; Wed, 29 Apr 2020 10:47:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=bvclRFDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726815AbgD2RoJ (ORCPT + 99 others); Wed, 29 Apr 2020 13:44:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726423AbgD2RoI (ORCPT ); Wed, 29 Apr 2020 13:44:08 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3E98C03C1AE; Wed, 29 Apr 2020 10:44:07 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id n4so2274823ejs.11; Wed, 29 Apr 2020 10:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eC8iaDbgklls5vEW6hsS6u3vGO3A7JOSp8YigJew5EA=; b=bvclRFDuLkpTtiVgsW0BitiFkM6+uhKOeMNaZdxP9IJ82a5ULdAJ2VH3S+nGkpNIaQ EDaiWmDWLw5kX/3tH1rJKurL/Ti317bdXQczBcfEMms7ESkO9MSaryPQUtpc8XF87mrP NESSGlqbBUJTdbLFxU7eD6+aGkeGjtVfdLOs2rtlF4Q43FnyD9oH09/ci9XJEBTelD7S y65keStSIqnp/yt3jpxhHrbTydYFPDudkA5mE2aoZR3tW29J0s6qfynsmdLnlZ7UmEii rROG/jhH9TKectRAZVexXhuftpBEB49ArxKa+pM4Q2vuICV1zymxkwdgfKQm0fV3puAp tJ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eC8iaDbgklls5vEW6hsS6u3vGO3A7JOSp8YigJew5EA=; b=ixCV6p91nAFP/+kBikz7KKzDWJ+pfggJfgN/hWAvChtrAkCaTC8Aq1qcAaKLwjBdGQ Fu+/kuKoPJPb3fivG0GBAkdozU1ucMFLVKDRRjpwv7ockPVdQfb7ifcW4yqAZUog87f9 mJ8VoJ2LhywK6CeUZOCm3FG5UB2qvf9KMxwaBid+OjyFRyHt658OaI2lAyBFj6ljZAVl 8URYR5Yqtnj89ARAyoXuizhNDLd7Q/xqs4mG5Ez3k+A/J4/qLOac+aN5zl2y0kRyXfPw A9Xxjk+ItmPyGVQa2KkUBMJjSW34ceKIXQLNUuD8++zIgHjFjrZ28/0z7qyzWVIXbml6 SClw== X-Gm-Message-State: AGi0PuajjO5ubmQ58QUPThzHprRaXJQ0IckQ1zFfKLwWiOtcNOqCixLn nwh7emDDTYKnvDslidrZ1t3b/y3FjF5OMrgWgac= X-Received: by 2002:a17:906:1a06:: with SMTP id i6mr3710924ejf.90.1588182246619; Wed, 29 Apr 2020 10:44:06 -0700 (PDT) MIME-Version: 1.0 References: <20200429031416.3900-1-bernard@vivo.com> <1jpnbqii2y.fsf@starbuckisacylon.baylibre.com> In-Reply-To: <1jpnbqii2y.fsf@starbuckisacylon.baylibre.com> From: Martin Blumenstingl Date: Wed, 29 Apr 2020 19:43:55 +0200 Message-ID: Subject: Re: [PATCH] clk/meson: fixes memleak issue in init err branch To: Jerome Brunet Cc: Bernard Zhao , Neil Armstrong , Stephen Boyd , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Content-Type: multipart/mixed; boundary="000000000000a6133905a4717e48" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000a6133905a4717e48 Content-Type: text/plain; charset="UTF-8" Hi Jerome, On Wed, Apr 29, 2020 at 2:37 PM Jerome Brunet wrote: > > > On Wed 29 Apr 2020 at 05:14, Bernard Zhao wrote: > > > In common init function, when run into err branch, we didn`t > > use kfree to release kzmalloc area, this may bring in memleak > > Thx for reporting this Bernard. > I'm not a fan of adding kfree everywhere. I'd much prefer a label and > clear error exit path. > > That being said, the allocation is probably not the only thing that > needs to be undone in case of error. I guess this is due to conversion > to CLK_OF_DECLARE_DRIVER() which forced to drop all the devm_ > This was done because the clock controller was required early in the > boot sequence. > > There is 2 paths to properly solve this: > 1) Old school: manually undo everything with every error exit condition > Doable but probably a bit messy > 2) Convert back the driver to a real platform driver and use devm_. > We would still need the controller to register early but I wonder if > we could use the same method as drivers/clk/mediatek/clk-mt2701.c and > use arch_initcall() ? > > Martin, you did the initial conversion, what do you think of option 2 ? I tried it with the attached patch unfortunately my "m8b_clkc_test_probe" is still run too late > Would it still answer the problem you were trying to solve back then ? I'm afraid it does not: - the resets are needed early for SMP initialization - the clocks are needed even earlier for timer registration (we have both, the ARM TWD timer and some Amlogic custom timer. both have clock inputs) > One added benefit of option 2 is we could drop CLK_OF_DECLARE_DRIVER(). > We could even do the same in for the other SoCs, which I suppose would > avoid a fair amount of probe deferral. it would be great, indeed but this will only work once timer initialization and SMP boot can happen at a later stage If the clock controller registration fails the board won't boot. Yes, cleaning up memory is good, but in this specific case it will add a couple of extra CPU cycles before the kernel is dead So, if we want to ignore that fact then I agree with your first option (undoing things the "old school" way). Martin --000000000000a6133905a4717e48 Content-Type: text/plain; charset="US-ASCII"; name="test-dmesg.txt" Content-Disposition: attachment; filename="test-dmesg.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k9lmcht60 WyAgICAwLjAwMDAwMF0gQm9vdGluZyBMaW51eCBvbiBwaHlzaWNhbCBDUFUgMHgyMDAKWyAgICAw LjAwMDAwMF0gTGludXggdmVyc2lvbiA1LjcuMC1yYzMtMDAxNDItZzBiZTQ0MmZjMTZjOC1kaXJ0 eSAoeGRhcmtsaWdodEBibGFja2JveCkgKGdjYyB2ZXJzaW9uIDkuMy4wIChBcmNoIFJlcG9zaXRv cnkpLCBHTlUgbGQgKEdOVSBCaW51dGlscykgMi4zNCkgIzYzOTcgU01QIFBSRUVNUFQgV2VkIEFw ciAyOSAxOTozMjowNyBDRVNUIDIwMjAKWyAgICAwLjAwMDAwMF0gQ1BVOiBBUk12NyBQcm9jZXNz b3IgWzQxMGZjMDUxXSByZXZpc2lvbiAxIChBUk12NyksIGNyPTEwYzUzODdkClsgICAgMC4wMDAw MDBdIENQVTogUElQVCAvIFZJUFQgbm9uYWxpYXNpbmcgZGF0YSBjYWNoZSwgVklQVCBhbGlhc2lu ZyBpbnN0cnVjdGlvbiBjYWNoZQpbICAgIDAuMDAwMDAwXSBPRjogZmR0OiBNYWNoaW5lIG1vZGVs OiBFbmRsZXNzIENvbXB1dGVycyBFbmRsZXNzIE1pbmkKWyAgICAwLjAwMDAwMF0gTWVtb3J5IHBv bGljeTogRGF0YSBjYWNoZSB3cml0ZWFsbG9jClsgICAgMC4wMDAwMDBdIGNtYTogUmVzZXJ2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jE4NTQ5MV0g dGhlcm1hbF9zeXM6IFJlZ2lzdGVyZWQgdGhlcm1hbCBnb3Zlcm5vciAnc3RlcF93aXNlJwpbICAg IDAuMTg1NTAxXSB0aGVybWFsX3N5czogUmVnaXN0ZXJlZCB0aGVybWFsIGdvdmVybm9yICd1c2Vy X3NwYWNlJwpbICAgIDAuMTg2Nzg5XSBORVQ6IFJlZ2lzdGVyZWQgcHJvdG9jb2wgZmFtaWx5IDE2 ClsgICAgMC4xODk5NzZdIERNQTogcHJlYWxsb2NhdGVkIDI1NiBLaUIgcG9vbCBmb3IgYXRvbWlj IGNvaGVyZW50IGFsbG9jYXRpb25zClsgICAgMC4xOTA3MjldIGF1ZGl0OiBpbml0aWFsaXppbmcg bmV0bGluayBzdWJzeXMgKGRpc2FibGVkKQpbICAgIDAuMTkxMDQ2XSBhdWRpdDogdHlwZT0yMDAw IGF1ZGl0KDAuMTg4OjEpOiBzdGF0ZT1pbml0aWFsaXplZCBhdWRpdF9lbmFibGVkPTAgcmVzPTEK WyAgICAwLjE5MjA3OV0gY3B1aWRsZTogdXNpbmcgZ292ZXJub3IgbWVudQpbICAgIDAuMTkyMzY3 XSBObyBBVEFHcz8KWyAgICAwLjE5MjU2Nl0gaHctYnJlYWtwb2ludDogZm91bmQgMiAoKzEgcmVz ZXJ2ZWQpIGJyZWFrcG9pbnQgYW5kIDEgd2F0Y2hwb2ludCByZWdpc3RlcnMuClsgICAgMC4xOTI1 ODNdIGh3LWJyZWFrcG9pbnQ6IG1heGltdW0gd2F0Y2hwb2ludCBzaXplIGlzIDQgYnl0ZXMuClsg ICAgMC4xOTQ0NDNdIGNsay1tOGItdGVzdCBjMTEwNDAwMC5zeXN0ZW0tY29udHJvbGxlcjpjbG9j ay1jb250cm9sbGVyOiBtOGJfY2xrY190ZXN0IElOSVQKLi4uLgo= --000000000000a6133905a4717e48 Content-Type: text/x-patch; charset="US-ASCII"; name="test.patch" Content-Disposition: attachment; filename="test.patch" Content-Transfer-Encoding: base64 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