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: Wed, 29 May 2024 19:19:47 +0800
From: Hongchen Zhang <zhanghongchen@...ngson.cn>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Huacai Chen <chenhuacai@...ngson.cn>,
	linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	loongarch@...ts.linux.dev,
	Hongchen Zhang <zhanghongchen@...ngson.cn>,
	stable@...r.kernel.org
Subject: [PATCH] PCI: use local_pci_probe when best selected cpu is offline

When the best selected cpu is offline, work_on_cpu will stuck
forever. Therefore, in this case, we should call
local_pci_probe instead of work_on_cpu.

Cc: <stable@...r.kernel.org>
Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
Signed-off-by: Hongchen Zhang <zhanghongchen@...ngson.cn>
---
 drivers/pci/pci-driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index af2996d0d17f..32a99828e6a3 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -386,7 +386,7 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
 		free_cpumask_var(wq_domain_mask);
 	}
 
-	if (cpu < nr_cpu_ids)
+	if ((cpu < nr_cpu_ids) && cpu_online(cpu))
 		error = work_on_cpu(cpu, local_pci_probe, &ddi);
 	else
 		error = local_pci_probe(&ddi);
-- 
2.33.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ