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]
Date:   Thu, 28 Oct 2021 23:20:02 -0400
From:   He Ying <heying24@...wei.com>
To:     <galak@...nel.crashing.org>, <timur@...escale.com>, <arnd@...db.de>
CC:     <linux-kernel@...r.kernel.org>
Subject: [PATCH] fsl_hypervisor: Add missing of_node_put in fsl_hypervisor_init

Early exits from for_each_compatible_node() should decrement the
node reference counter.

Signed-off-by: He Ying <heying24@...wei.com>
Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver")
---
 drivers/virt/fsl_hypervisor.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 46ee0a0998b6..ef5fcca4b8f0 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -849,8 +849,10 @@ static int __init fsl_hypervisor_init(void)
 		}
 
 		dbisr = kzalloc(sizeof(*dbisr), GFP_KERNEL);
-		if (!dbisr)
+		if (!dbisr) {
+			of_node_put(np);
 			goto out_of_memory;
+		}
 
 		dbisr->irq = irq;
 		dbisr->doorbell = be32_to_cpup(handle);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ