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 278DCD0D79C for ; Fri, 11 Oct 2024 14:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=geootXrIsAQGLloZC96yysl4goUE7ZCxRPZl6ydzg5c=; b=UNBbQRCVReL6BJpom8eNX7qIgP SzxWTUiyUR9RL4054rc5kClPdfXoudzOD+Xa6aM6ejW6Xmuzi6oTQGjRDhNNEazxdJizikY4gLoMc LnIgodMbe7qVUOhh2PwfKUfLy3iyJ6jvKYZLCblr8OA2kzqQnLg6TQ89q6Mt+AMYFPjASjxEm3yww Aq/rqy1DfXJ/RaSZ+4OwiD8YX7ZWd7YB6mgPuqKZH4PAHAg102cIoXx3qgLzPHoBKsUwOH/iFVvTC qNyT1KUDnBtrV4ejXCJNV6Ad5Er3zCIfgBnkFbCcm7YUm5sp957jpto/t6H+qhxEhm+eiAaLHSVGl vIFh3VPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szGi0-0000000GcEz-408q; Fri, 11 Oct 2024 14:33:36 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szGaB-0000000GbEU-0vIX for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 14:25:32 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1524ADA7; Fri, 11 Oct 2024 07:26:00 -0700 (PDT) Received: from pluto (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6C6A83F5A1; Fri, 11 Oct 2024 07:25:28 -0700 (PDT) Date: Fri, 11 Oct 2024 15:25:25 +0100 From: Cristian Marussi To: Su Hui Cc: sudeep.holla@arm.com, cristian.marussi@arm.com, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] firmware: arm_scmi: fix the double free in scmi_debugfs_common_setup() Message-ID: References: <20241011104001.1546476-1-suhui@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241011104001.1546476-1-suhui@nfschina.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241011_072531_318963_4459B68D X-CRM114-Status: UNSURE ( 6.02 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 11, 2024 at 06:40:02PM +0800, Su Hui wrote: > Clang static checker(scan-build) warning: > drivers/firmware/arm_scmi/driver.c:line 2915, column 2 > Attempt to free released memory. > > When devm_add_action_or_reset() failed , scmi_debugfs_common_cleanup() > will run twice which caused double free of 'dbg->name'. > Remove the redundant scmi_debugfs_common_cleanup() to fix this problem. > Oh Yes...my bad, Good Catch ! LGTM. Reviewed-by: Cristian Marussi Thanks, Cristian