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: <tencent_BA28CC6897B7C95A92EB8C580B5D18589105@qq.com>
Date:   Fri, 19 Nov 2021 17:12:18 +0800
From:   Peiwei Hu <jlu.hpw@...mail.com>
To:     mpe@...erman.id.au, benh@...nel.crashing.org, paulus@...ba.org,
        aneesh.kumar@...ux.ibm.com, ardb@...nel.org,
        rafael.j.wysocki@...el.com, masahiroy@...nel.org,
        npiggin@...il.com, andriy.shevchenko@...ux.intel.com,
        adobriyan@...il.com, clg@...d.org
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        trivial@...nel.org, Peiwei Hu <jlu.hpw@...mail.com>
Subject: [PATCH] powerpc/prom_init: fix the improper check of prom_getprop

prom_getprop() can return PROM_ERROR. Binary operator can not identify it.

Signed-off-by: Peiwei Hu <jlu.hpw@...mail.com>
---
 arch/powerpc/kernel/prom_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 18b04b08b983..f845065c860e 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2991,7 +2991,7 @@ static void __init fixup_device_tree_efika_add_phy(void)
 
 	/* Check if the phy-handle property exists - bail if it does */
 	rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
-	if (!rv)
+	if (rv <= 0)
 		return;
 
 	/*
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ