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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240816-dwc_pmu_fix-v2-3-198b8ab1077c@quicinc.com>
Date: Fri, 16 Aug 2024 20:47:22 +0530
From: Krishna chaitanya chundru <quic_krichai@...cinc.com>
To: Shuai Xue <xueshuai@...ux.alibaba.com>,
        Jing Zhang
	<renyu.zj@...ux.alibaba.com>,
        Will Deacon <will@...nel.org>, Mark Rutland
	<mark.rutland@....com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        "Yicong
 Yang" <yangyicong@...ilicon.com>,
        Jonathan Cameron
	<Jonathan.Cameron@...wei.com>,
        Jonathan Corbet <corbet@....net>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-doc@...r.kernel.org>,
        <quic_vbadigan@...cinc.com>, <quic_nitegupt@...cinc.com>,
        <quic_skananth@...cinc.com>, <quic_ramkri@...cinc.com>,
        <quic_parass@...cinc.com>, <quic_mrana@...cinc.com>,
        "Krishna chaitanya
 chundru" <quic_krichai@...cinc.com>
Subject: [PATCH v2 3/4] perf/dwc_pcie: Always register for PCIe bus
 notifier

When the PCIe devices are discovered late, the driver can't find
the PCIe devices and returns in the init without registering with
the bus notifier. Due to that the devices which are discovered late
the driver can't register for this.

Register for bus notifier & driver even if the device is not found
as part of init.

Fixes: af9597adc2f1 ("drivers/perf: add DesignWare PCIe PMU driver")
Signed-off-by: Krishna chaitanya chundru <quic_krichai@...cinc.com>
---
 drivers/perf/dwc_pcie_pmu.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/perf/dwc_pcie_pmu.c b/drivers/perf/dwc_pcie_pmu.c
index 85a5155d6018..f205ecad2e4c 100644
--- a/drivers/perf/dwc_pcie_pmu.c
+++ b/drivers/perf/dwc_pcie_pmu.c
@@ -726,7 +726,6 @@ static struct platform_driver dwc_pcie_pmu_driver = {
 static int __init dwc_pcie_pmu_init(void)
 {
 	struct pci_dev *pdev = NULL;
-	bool found = false;
 	int ret;
 
 	for_each_pci_dev(pdev) {
@@ -738,11 +737,7 @@ static int __init dwc_pcie_pmu_init(void)
 			pci_dev_put(pdev);
 			return ret;
 		}
-
-		found = true;
 	}
-	if (!found)
-		return -ENODEV;
 
 	ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN,
 				      "perf/dwc_pcie_pmu:online",

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ