summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2026-02-06 17:09:32 -0600
committerBjorn Helgaas <bhelgaas@google.com>2026-02-06 17:09:32 -0600
commit0bf920768e062e98e209f06e0d3b2e552173e2b8 (patch)
treebb6e08a494e305c1cc37678df15467af810075c4 /drivers/pci/hotplug
parent2095b9dd2eb7a944619d49653adff95238586270 (diff)
parent03f336a869b3a3f119d3ae52ac9723739c7fb7b6 (diff)
downloadlinux-next-0bf920768e062e98e209f06e0d3b2e552173e2b8.tar.gz
linux-next-0bf920768e062e98e209f06e0d3b2e552173e2b8.zip
Merge branch 'pci/workqueue'
- Add WQ_PERCPU to alloc_workqueue() users (Marco Crivellari) - Replace use of system_wq with system_percpu_wq (Marco Crivellari) - Check for failure of alloc_workqueue() to avoid NULL pointer dereferences (Haotian Zhang) * pci/workqueue: PCI: endpoint: Add missing NULL check for alloc_workqueue() PCI: endpoint: Replace use of system_wq with system_percpu_wq PCI: Add WQ_PERCPU to alloc_workqueue() users # Conflicts: # drivers/pci/endpoint/pci-ep-cfs.c
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/pnv_php.c2
-rw-r--r--drivers/pci/hotplug/shpchp_core.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
index c5345bff9a55..35f1758126c6 100644
--- a/drivers/pci/hotplug/pnv_php.c
+++ b/drivers/pci/hotplug/pnv_php.c
@@ -802,7 +802,7 @@ static struct pnv_php_slot *pnv_php_alloc_slot(struct device_node *dn)
}
/* Allocate workqueue for this slot's interrupt handling */
- php_slot->wq = alloc_workqueue("pciehp-%s", 0, 0, php_slot->name);
+ php_slot->wq = alloc_workqueue("pciehp-%s", WQ_PERCPU, 0, php_slot->name);
if (!php_slot->wq) {
SLOT_WARN(php_slot, "Cannot alloc workqueue\n");
kfree(php_slot->name);
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 0c341453afc6..56308515ecba 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -80,7 +80,8 @@ static int init_slots(struct controller *ctrl)
slot->device = ctrl->slot_device_offset + i;
slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i);
- slot->wq = alloc_workqueue("shpchp-%d", 0, 0, slot->number);
+ slot->wq = alloc_workqueue("shpchp-%d", WQ_PERCPU, 0,
+ slot->number);
if (!slot->wq) {
retval = -ENOMEM;
goto error_slot;