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, 13 Jul 2023 18:41:41 +0800
From:   Li Chen <me@...ux.beauty>
To:     "Rob Herring" <robh+dt@...nel.org>,
        "Frank Rowand" <frowand.list@...il.com>,
        "devicetree" <devicetree@...r.kernel.org>,
        "linux-kernel" <linux-kernel@...r.kernel.org>
Subject: [PATCH] of: property: fw_devlink: fixup return value check of
  strcmp_suffix in parse_gpios

From: Li Chen <lchen@...arella.com>

This commit addresses an issue where enabling fw_devlink=on was causing
a PCIe malfunction, resulting in endpoints missing.
After thorough investigation, it was determined that the root cause was
an incorrect usage of strcmp_suffix in parse_gpios.

Fixes: d473d32c2fba ("of: property: fw_devlink: do not link ".*,nr-gpios"")
Signed-off-by: Li Chen <lchen@...arella.com>
---
 drivers/of/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/property.c b/drivers/of/property.c
index ddc75cd50825..261eb8f3be08 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1272,7 +1272,7 @@ DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
 static struct device_node *parse_gpios(struct device_node *np,
 				       const char *prop_name, int index)
 {
-	if (!strcmp_suffix(prop_name, ",nr-gpios"))
+	if (strcmp_suffix(prop_name, ",nr-gpios"))
 		return NULL;
 
 	return parse_suffix_prop_cells(np, prop_name, index, "-gpios",
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ