Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+19 -8
+1 -1
drivers/pci/endpoint/functions/pci-epf-mhi.c
··· 686 686 goto err_release_tx; 687 687 } 688 688 689 - epf_mhi->dma_wq = alloc_workqueue("pci_epf_mhi_dma_wq", 0, 0); 689 + epf_mhi->dma_wq = alloc_workqueue("pci_epf_mhi_dma_wq", WQ_PERCPU, 0); 690 690 if (!epf_mhi->dma_wq) { 691 691 ret = -ENOMEM; 692 692 goto err_release_rx;
+7 -2
drivers/pci/endpoint/functions/pci-epf-ntb.c
··· 2124 2124 { 2125 2125 int ret; 2126 2126 2127 - kpcintb_workqueue = alloc_workqueue("kpcintb", WQ_MEM_RECLAIM | 2128 - WQ_HIGHPRI, 0); 2127 + kpcintb_workqueue = alloc_workqueue("kpcintb", 2128 + WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_PERCPU, 0); 2129 + if (!kpcintb_workqueue) { 2130 + pr_err("Failed to allocate kpcintb workqueue\n"); 2131 + return -ENOMEM; 2132 + } 2133 + 2129 2134 ret = pci_epf_register_driver(&epf_ntb_driver); 2130 2135 if (ret) { 2131 2136 destroy_workqueue(kpcintb_workqueue);
+1 -1
drivers/pci/endpoint/functions/pci-epf-test.c
··· 1188 1188 int ret; 1189 1189 1190 1190 kpcitest_workqueue = alloc_workqueue("kpcitest", 1191 - WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); 1191 + WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_PERCPU, 0); 1192 1192 if (!kpcitest_workqueue) { 1193 1193 pr_err("Failed to allocate the kpcitest work queue\n"); 1194 1194 return -ENOMEM;
+7 -2
drivers/pci/endpoint/functions/pci-epf-vntb.c
··· 1651 1651 { 1652 1652 int ret; 1653 1653 1654 - kpcintb_workqueue = alloc_workqueue("kpcintb", WQ_MEM_RECLAIM | 1655 - WQ_HIGHPRI, 0); 1654 + kpcintb_workqueue = alloc_workqueue("kpcintb", 1655 + WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_PERCPU, 0); 1656 + if (!kpcintb_workqueue) { 1657 + pr_err("Failed to allocate kpcintb workqueue\n"); 1658 + return -ENOMEM; 1659 + } 1660 + 1656 1661 ret = pci_epf_register_driver(&epf_ntb_driver); 1657 1662 if (ret) { 1658 1663 destroy_workqueue(kpcintb_workqueue);
+1 -1
drivers/pci/hotplug/pnv_php.c
··· 802 802 } 803 803 804 804 /* Allocate workqueue for this slot's interrupt handling */ 805 - php_slot->wq = alloc_workqueue("pciehp-%s", 0, 0, php_slot->name); 805 + php_slot->wq = alloc_workqueue("pciehp-%s", WQ_PERCPU, 0, php_slot->name); 806 806 if (!php_slot->wq) { 807 807 SLOT_WARN(php_slot, "Cannot alloc workqueue\n"); 808 808 kfree(php_slot->name);
+2 -1
drivers/pci/hotplug/shpchp_core.c
··· 80 80 slot->device = ctrl->slot_device_offset + i; 81 81 slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); 82 82 83 - slot->wq = alloc_workqueue("shpchp-%d", 0, 0, slot->number); 83 + slot->wq = alloc_workqueue("shpchp-%d", WQ_PERCPU, 0, 84 + slot->number); 84 85 if (!slot->wq) { 85 86 retval = -ENOMEM; 86 87 goto error_slot;