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 27C4FC6FA8E for ; Sun, 26 Feb 2023 03:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GF1hWA9GOvYQbmwhKMTnFgvSk8kHHFnQ77YrFxaUvaY=; b=MqXl8qyuBzVIDv LaPcGR1kCETzSPZ1RO4LMuTJRUsFrx7Q4hBqNQn9riH7TSAJC5sTRb9KCXFtwIVKIf6mdDBkrL1/j fT261+KZqIgUoSIpoM0qT96+K/BUXFnZMw1M9DYJLwlI8XvU4ynPDrpuvh9ZygYLD8jf7xAw/PDlU hfZ9cEdCSUODCqj4P2Arbr+P44++49lwjdWM1MqwxSLoxqZpWQFQA4jZGpS496ZbifkNlIvabYIrr K6+3WtSI43KkXT9hm9m7PL34lmWhiFQOKKypFDBcbt63rvB73jFpsgwFpV8fsiWCncdpZ6fX+coxq jJiZROZAfikgtc02nEZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pW7wI-006gr7-GG; Sun, 26 Feb 2023 03:43:06 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pW7wC-006gof-Cj for linux-arm-kernel@lists.infradead.org; Sun, 26 Feb 2023 03:43:01 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB17260BDE; Sun, 26 Feb 2023 03:42:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D5FAC433D2; Sun, 26 Feb 2023 03:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677382979; bh=LOy8hIp7Z8iWgeS0WqLr8AmLj+SvkhZkgozIO0aaJbY=; h=From:To:Cc:Subject:Date:From; b=teQiEpp0SoXb2ets/CRNLG8gstdyhLiEQzV5rjJ6mAlAonaHBlHhmPiW9dvqnGzJh +3KliMkVfLcynwWm3QwVQEN7ELr2ImKCZa21xrKN3KOImjbT6U0/nSHkzs1bgFd0NB dyJB8BAN2f+ocXJDnamcT64hI6jMT/R1EmVx5BpZFUYG8/bPyeQEciWW6hW4ORUJBE WV5xNr3IcDkKn2Ar6AGfa42fYVzeU/ehEybTVh6AjqDm5iO2aFqGdazZFoqfV/2jyc ayVqZATouo18qrTDnweXi/2YnyU8V1+XbkCFR3IpcRjw+i+2xcY9/j+cVXx0ZSTj1N npqziA1XvarTA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Liang He , Tony Lindgren , Sasha Levin , linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 01/21] ARM: OMAP2+: omap4-common: Fix refcount leak bug Date: Sat, 25 Feb 2023 22:42:36 -0500 Message-Id: <20230226034256.771769-1-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230225_194300_522044_DC54D768 X-CRM114-Status: GOOD ( 10.91 ) 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: , 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 From: Liang He [ Upstream commit 7c32919a378782c95c72bc028b5c30dfe8c11f82 ] In omap4_sram_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Message-Id: <20220628112939.160737-1-windhl@126.com> Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/omap4-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 6d1eb4eefefe5..d9ed2a5dcd5ef 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -140,6 +140,7 @@ static int __init omap4_sram_init(void) __func__); else sram_sync = (void __iomem *)gen_pool_alloc(sram_pool, PAGE_SIZE); + of_node_put(np); return 0; } -- 2.39.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel