linux-sg2042/drivers/pci
Jakub Kicinski 17530e71e0 PCI: Protect pci_driver->sriov_configure() usage with device_lock()
Every method in struct device_driver or structures derived from it like
struct pci_driver MUST provide exclusion vs the driver's ->remove() method,
usually by using device_lock().

Protect use of pci_driver->sriov_configure() by holding the device lock
while calling it.

The PCI core sets the pci_dev->driver pointer in local_pci_probe() before
calling ->probe() and only clears it after ->remove().  This means driver's
->sriov_configure() callback will happily race with probe() and remove(),
most likely leading to BUGs, since drivers don't expect this.

Remove the iov lock completely, since we remove the last user.

[bhelgaas: changelog, thanks to Christoph for locking rule]
Link: http://lkml.kernel.org/r/20170522225023.14010-1-jakub.kicinski@netronome.com
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2017-06-14 17:41:19 -05:00
..
dwc pci-v4.12-changes 2017-05-08 19:03:25 -07:00
endpoint PCI: endpoint: functions: Add an EP function to test PCI 2017-04-11 14:18:37 -05:00
host PCI: Don't allow unbinding host controllers that aren't prepared 2017-04-28 10:38:00 -05:00
hotplug Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
pcie Merge branch 'pci/enumeration' into next 2017-04-28 10:33:55 -05:00
switch switchtec: Add IOCTLs to the Switchtec driver 2017-04-12 12:23:37 -05:00
Kconfig Merge branch 'pci/switchtec' into next 2017-04-28 10:33:41 -05:00
Makefile Merge branch 'pci/resource-mmap' into next 2017-04-28 10:34:34 -05:00
access.c Merge branch 'pci/misc' into next 2017-04-28 10:34:14 -05:00
ats.c PCI: Restore PRI and PASID state after Function-Level Reset 2017-05-30 15:40:50 -05:00
bus.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
ecam.c PCI: ECAM: Map config region with pci_remap_cfgspace() 2017-04-24 13:53:14 -05:00
host-bridge.c cxl: use pcibios_free_controller_deferred() when removing vPHBs 2016-08-22 11:09:33 +10:00
hotplug-pci.c
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c PCI: Protect pci_driver->sriov_configure() usage with device_lock() 2017-06-14 17:41:19 -05:00
irq.c pci-v4.12-changes 2017-05-08 19:03:25 -07:00
mmap.c PCI: Add I/O BAR support to generic pci_mmap_resource_range() 2017-04-20 08:47:47 -05:00
msi.c pci-v4.12-changes 2017-05-08 19:03:25 -07:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Merge branch 'pci/pm' into next 2016-12-12 11:25:04 -06:00
pci-driver.c Merge branch 'pci/virtualization' into next 2017-04-28 10:36:12 -05:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-mid.c pci-v4.10-changes 2016-12-15 12:46:48 -08:00
pci-stub.c
pci-sysfs.c PCI: Protect pci_driver->sriov_configure() usage with device_lock() 2017-06-14 17:41:19 -05:00
pci.c PCI: Restore PRI and PASID state after Function-Level Reset 2017-05-30 15:40:50 -05:00
pci.h PCI: Protect pci_driver->sriov_configure() usage with device_lock() 2017-06-14 17:41:19 -05:00
probe.c IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
proc.c PCI: Add BAR index argument to pci_mmap_page_range() 2017-04-20 08:47:47 -05:00
quirks.c PCI: Mark Intel XXV710 NIC INTx masking as broken 2017-06-12 16:53:34 -05:00
remove.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
rom.c PCI: Add comments about ROM BAR updating 2016-11-29 18:05:09 -06:00
search.c PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT 2017-04-13 18:49:50 -05:00
setup-bus.c PCI: Fix calculation of bridge window's size and alignment 2017-04-18 14:47:20 -05:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant 2017-04-18 14:46:57 -05:00
slot.c locking/atomic, kref: Add kref_read() 2017-01-14 11:37:18 +01:00
syscall.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
vc.c PCI: Fix unaligned accesses in VC code 2016-06-20 13:24:20 -05:00
vpd.c
xen-pcifront.c xen: make use of xenbus_read_unsigned() in xen-pcifront 2016-11-07 13:55:26 +01:00