lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220616014636.3972830-1-windhl@126.com>
Date:   Thu, 16 Jun 2022 09:46:36 +0800
From:   Liang He <windhl@....com>
To:     thierry.reding@...il.com, jonathanh@...dia.com,
        p.zabel@...gutronix.de, digetx@...il.com, ndesaulniers@...gle.com,
        ulf.hansson@...aro.org, skamble@...dia.com, nathan@...nel.org,
        kkartik@...dia.com
Cc:     linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
        windhl@....com
Subject: [PATCH v2] soc: tegra: fuse: Add missing of_node_put in tegra_init_fuse

In this function, of_find_matching_node() will return a node
pointer with refcount incremented. We should use of_node_put
when the pointer *np* is not used anymore.

Signed-off-by: Liang He <windhl@....com>
---
 changelog:

 v2: use real name for Sob
 v1: fix the bug


 drivers/soc/tegra/fuse/fuse-tegra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index b0a8405dbdb1..6542267a224d 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -568,6 +568,7 @@ static int __init tegra_init_fuse(void)
 	np = of_find_matching_node(NULL, car_match);
 	if (np) {
 		void __iomem *base = of_iomap(np, 0);
+		of_node_put(np);
 		if (base) {
 			tegra_enable_fuse_clk(base);
 			iounmap(base);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ