> -----Original Message----- > From: linux-pci-owner@xxxxxxxxxxxxxxx [mailto:linux-pci- > owner@xxxxxxxxxxxxxxx] On Behalf Of Sandeep Mann > Sent: Friday, August 01, 2014 3:47 PM > To: bhelgaas@xxxxxxxxxx; linux-pci@xxxxxxxxxxxxxxx > Subject: [PATCH] PCI: pciehp: Use ordered workqueue for HPC events > > 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@xxxxxxxxxxxxxxx> Acked-by: Rajat Jain <rajatxjain@xxxxxxxxx> Yes, this is good and needed. Sometime back I felt the need for it, but sort of assumed that the slot->wq is already ordered. Thanks, Rajat > --- > 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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in the > body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at > http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html