Message ID | 20220512085244.30265-1-linmq006@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=h1gPCv/x; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Uqw3a66N; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KzQXw3JQxz9sGJ for <incoming-imx@patchwork.ozlabs.org>; Thu, 12 May 2022 18:53:20 +1000 (AEST) 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:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QX0slmbyMa1IQ57GovWZ0jBO/wUgfKYSfuItDUNkxBk=; b=h1gPCv/xFfIzee P3eC4ykQjenXbjlbbuEMIqnbWvBjb3g5X8vQIjsDPPcSW9PeHzgVz7XjfwixcRiObpdyS5NCFMXgL 7FouYTY4upPlCBi2J3hLz7uZstkAJqm2UeZ1DWInoVOQV4PKuetP+LSyOtz7aZfWzEjVN2QxIm/fB k8YUoELpbCLeFY7f+vC/HRnimYDE4snurlCR90eeP6a0uY94D/VA8REkEYFd/ZWpS2mkZtb0wAr42 bBmNUhOpwWHoLX7w4fNva9R3ZZfpEx2BpE27hum/y8BURk9KX7FwyiUzR3GxrXKb2kp4QfoRG9m7h spc/RLi1ORt5GS0+hCkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1np4ZC-00B4Zj-G0; Thu, 12 May 2022 08:53:02 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1np4Z6-00B4Ua-IM for linux-arm-kernel@lists.infradead.org; Thu, 12 May 2022 08:52:57 +0000 Received: by mail-pj1-x1033.google.com with SMTP id a15-20020a17090ad80f00b001dc2e23ad84so7215401pjv.4 for <linux-arm-kernel@lists.infradead.org>; Thu, 12 May 2022 01:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=/vpL1t0Gds79zok3GkOwdARYiSTxkflwM+27BDmbSYY=; b=Uqw3a66NQ6q48VkV7qyg9aQTCDRPUz1MlRyQt8djR7jTV5U8yOnkCJSl93cw3u1D9+ j3GYAp0NeiYQ9CtRrl2N40D5gXK4LSbnl0eFsWQ0KyvE2e/GQefTzXKjLsc25gv6yEJ+ qWpBJsqnmSkLS0DxG9cXseTP0x6wjN1XuwTGG1/0jd9zrgsFX1ZOKs0g4du/0y24/3rK Ao7Bg9Ns31cSCKfh7jehPkZfOAytFuJVbfGOXmJMRfG9UeCFcMf4gzHej76HhMaImWN3 ESlsSaoDlzD0TozGkTDHh5OdWp2AomyBE6syHNWv29s4xEU2sSeMtOBDzL9CAEt2pWue s9EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=/vpL1t0Gds79zok3GkOwdARYiSTxkflwM+27BDmbSYY=; b=dasv38gWCUamw4EW9teXE/Tr+L6Bu6ImDO6tui/zldC+DSTtpg3YA9Jl/2bdrsY/cS zssMzR/kDpw3e/NAOBt6pwKWjFTvF9K8O0jtP07vexOUjrop6rP1l721zhPkseQNQUL2 cHpJCS9sU3DknFsVBnmVCxovvgvHSbvzVknRSLk2X49s3OCwoC+wrPz8cKeB9UhOiCP7 XX3fr/UdfvDo8ro8ViQoAwYNeELru43qLx8xuMY7I5LcCDJEm6FputQIYBVE/iWm1ZsD Wf5OXYPd5cdNEKs/ie6xUOzMa/UZnRBAcJABVX6DWjv2VzKOXPk0Dr03CAeGr/kzo4TF D4vg== X-Gm-Message-State: AOAM530Cn1P4SYRRb9AaAtJ6UOX8/QxBUe+Dc6qeeljqYHf4c1EiliVf KBgJGJuKmsdkjTIQYN4JWWg= X-Google-Smtp-Source: ABdhPJzK4EZAUk/2owdPhXu1aU/+SeMB5J1vuQZ4lQB+ZdMno82cUI4IGQdQZZirNyt1gQifXGrT3Q== X-Received: by 2002:a17:902:d415:b0:15c:ea4b:7b8e with SMTP id b21-20020a170902d41500b0015cea4b7b8emr30098380ple.86.1652345572862; Thu, 12 May 2022 01:52:52 -0700 (PDT) Received: from localhost.localdomain ([202.120.234.246]) by smtp.googlemail.com with ESMTPSA id 123-20020a621581000000b0050dc76281basm3299780pfv.148.2022.05.12.01.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 01:52:52 -0700 (PDT) From: Miaoqian Lin <linmq006@gmail.com> To: Russell King <linux@armlinux.org.uk>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Miaoqian Lin <linmq006@gmail.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: mxs: Fix refcount leak in mxs_get_ocotp Date: Thu, 12 May 2022 12:52:41 +0400 Message-Id: <20220512085244.30265-1-linmq006@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220512_015256_622940_B905BF57 X-CRM114-Status: GOOD ( 11.31 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 1bff2d76ac88 ("ARM: mxs: move mxs_get_ocotp() into mach-mxs.c") Signed-off-by: Miaoqian Lin --- arch/arm/mach-mxs/mach-mxs.c | 1 + 1 file changed, 1 insertion(+) Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1033 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [linmq006[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [linmq006[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org |
Series |
ARM: mxs: Fix refcount leak in mxs_get_ocotp
|
expand
|
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 25c9d184fa4c..4af4c3dcfa85 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -99,6 +99,7 @@ static const u32 *mxs_get_ocotp(void) np = of_find_compatible_node(NULL, NULL, "fsl,ocotp"); ocotp_base = of_iomap(np, 0); WARN_ON(!ocotp_base); + of_node_put(np); mutex_lock(&ocotp_mutex);
of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 1bff2d76ac88 ("ARM: mxs: move mxs_get_ocotp() into mach-mxs.c") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> --- arch/arm/mach-mxs/mach-mxs.c | 1 + 1 file changed, 1 insertion(+)