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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220615125739.3966617-1-windhl@126.com>
Date:   Wed, 15 Jun 2022 20:57:39 +0800
From:   Liang He <windhl@....com>
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com
Cc:     jgg@...pe.ca, kirill.shutemov@...ux.intel.com,
        brijesh.singh@....com, linux-kernel@...r.kernel.org, windhl@....com
Subject: [PATCH] arch: x86: kernel: Add missing of_node_put() in x86_init.c

In x86_wallclock_init(), we need to use of_node_put() for the
of_find_matching_node() which returns a node pointer with refcount
incremented.

Signed-off-by: Liang He <windhl@....com>
---
 arch/x86/kernel/x86_init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index e84ee5cdbd8c..81c071080efe 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -50,6 +50,7 @@ static __init void x86_wallclock_init(void)
 	struct device_node *node = of_find_matching_node(NULL, of_cmos_match);
 
 	if (node && !of_device_is_available(node)) {
+		of_node_put(node);
 		x86_platform.get_wallclock = get_rtc_noop;
 		x86_platform.set_wallclock = set_rtc_noop;
 	}
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ