linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: pciehp: Use ordered workqueue for HPC events
@ 2014-08-01 22:47 Sandeep Mann
  2014-08-04 20:22 ` Rajat Jain
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Sandeep Mann @ 2014-08-01 22:47 UTC (permalink / raw)
  To: bhelgaas, linux-pci

Using an ordered workqueue serializes processing of hotplug event. Processing
an hotplug event for some devices can take a relatively "long" time, which
means if a device is added and removed in quick succession (or due to flacky
hardware), it can lead to multiple outstanding hotplug events. Processing
these events concurrently can lead to unknown internal state and/or kernel
panics.

Signed-off-by: Sandeep Mann <sandeep@purestorage.com>
---
 drivers/pci/hotplug/pciehp_hpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 42914e0..c4eedab 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -681,7 +681,7 @@ static int pcie_init_slot(struct controller *ctrl)
 	if (!slot)
 		return -ENOMEM;
 
-	slot->wq = alloc_workqueue("pciehp-%u", 0, 0, PSN(ctrl));
+	slot->wq = alloc_ordered_workqueue("pciehp-%u", 0, PSN(ctrl));
 	if (!slot->wq)
 		goto abort;
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-11-04  8:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 22:47 [PATCH] PCI: pciehp: Use ordered workqueue for HPC events Sandeep Mann
2014-08-04 20:22 ` Rajat Jain
2014-08-12 22:00 ` Bjorn Helgaas
2014-08-12 22:30   ` Sandeep S Mann
2014-08-12 23:31     ` Rajat Jain
2014-08-13  0:09       ` Sandeep S Mann
2014-08-13  0:33         ` Rajat Jain
2014-08-13 17:00           ` Sandeep S Mann
2014-09-04 21:10 ` Bjorn Helgaas
2014-11-04  8:10   ` Rajat Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).