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=-9.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 472AEC4727C for ; Sat, 26 Sep 2020 00:30:24 +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 D0E1722211 for ; Sat, 26 Sep 2020 00:30:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Z7w04qbw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="US6zcE7B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0E1722211 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com 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-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0QGY2FPzk/d67AWk0qIrqlKJQ1GzlgWLn4fo82iVSqg=; b=Z7w04qbwNzO0UiEK45yCu+lfc 1QGrsW19yYkh1FYl9WL8ZjtMpsAhdeWo/dR6U6nA1wk/UfDXKqGWLfppCEgA7o0RtU9Xt6taVLyNn Wk3y8seICfepduWos8u01uzKPAatUOfGmHMxZaKufltTzlcx5W1lmJl0TwjR+A9RqiewPbeynTgOA gGS5UY01GiaFx/BipJ4t9dagKuCbXYTkHiQMVpsFHeTXzmE+mDlrJ/axXd5x293YfA4X64HkMMdep JruaCg8l+RVVrnp8/aOCgZuOdGlLihm9lakXQBuk4a6FcClVLH62XUVxcQccP+Xqxgijpy1ONYDNG ksqv/PSOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLy4u-0003Le-VR; Sat, 26 Sep 2020 00:28:41 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLy4s-0003LC-EB for linux-arm-kernel@lists.infradead.org; Sat, 26 Sep 2020 00:28:39 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08Q0SUdO068263; Fri, 25 Sep 2020 19:28:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601080111; bh=9n7pUTyuv/cuPHlTws9RJoHfjArgioF7CkoVZuD5NAM=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=US6zcE7BdGGh0SWtoDchcR85l3876Eyx2UuFvinr4kQLfFr5mf4U4QUnqXZqO1SR7 cpgJbBQma4ZPw5eVzLyjQEIkv5fnHf7qj/j4k/bB81LPeOTiZVRZTfnrWP4QWl2++B XncXGpR0HNrDI3twqC8XkxFKXbO0PSTipmbkpDAU= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 08Q0SUvv069296 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 25 Sep 2020 19:28:30 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 25 Sep 2020 19:28:30 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 25 Sep 2020 19:28:30 -0500 Received: from [10.250.69.208] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08Q0SU0D086435; Fri, 25 Sep 2020 19:28:30 -0500 Subject: Re: [PATCH] mfd: syscon: Don't free allocated name for regmap_config To: Lee Jones , Marc Zyngier References: <20200903160237.932818-1-maz@kernel.org> <20200924123936.GJ4678@dell> From: Suman Anna Message-ID: <04fac15b-8866-efe4-1047-b20713f5200f@ti.com> Date: Fri, 25 Sep 2020 19:28:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200924123936.GJ4678@dell> Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200925_202838_581442_44EA6F75 X-CRM114-Status: GOOD ( 19.34 ) 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: kernel-team@android.com, Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/24/20 7:39 AM, Lee Jones wrote: > On Thu, 03 Sep 2020, Marc Zyngier wrote: > >> The name allocated for the regmap_config structure is freed >> pretty early, right after the registration of the MMIO region. >> >> Unfortunately, that doesn't follow the life cycle that debugfs >> expects, as it can access the name field long after the free >> has occured. >> >> Move the free on the error path, and keep it forever otherwise. >> >> Fixes: e15d7f2b81d2 ("mfd: syscon: Use a unique name with regmap_config") >> Signed-off-by: Marc Zyngier >> --- >> drivers/mfd/syscon.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Fixed the spelling mistake and applied, thanks. > Marc, Can you recheck the behavior once on the latest master to see if this patch is still needed? I see a new patch within the regmap core that is dealing with the delayed debugfs registration name. This follows the similar design logic I suggested on your initial submission [1]. Please see commit 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays") in mainline. Lee, I haven't seen this patch in -next yet, so maybe worthwhile to hold it a little longer. regards Suman [1] https://patchwork.kernel.org/comment/23575471/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel