1. 15 Jan, 2014 3 commits
    • Rafael J. Wysocki's avatar
      PCI: Check parent kobject in pci_destroy_dev() · 8a4c5c32
      Rafael J. Wysocki authored
      If pci_stop_and_remove_bus_device() is run concurrently for a device and
      its parent bridge via remove_callback(), both code paths attempt to acquire
      pci_rescan_remove_lock.  If the child device removal acquires it first,
      there will be no problems.  However, if the parent bridge removal acquires
      it first, it will eventually execute pci_destroy_dev() for the child
      device, but that device object will not be freed yet due to the reference
      held by the concurrent child removal.  Consequently, both
      pci_stop_bus_device() and pci_remove_bus_device() will be executed for that
      device unnecessarily and pci_destroy_dev() will see a corrupted list head
      in that object.  Moreover, an excess put_device() will be executed for that
      device in that case which may lead to a use-after-free in the final
      kobject_put() done by sysfs_schedule_callback_work().
      
      To avoid that problem, make pci_destroy_dev() check if the device's parent
      kobject is NULL, which only happens after device_del() has already run for
      it.  Make pci_destroy_dev() return immediately whithout doing anything in
      that case.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      8a4c5c32
    • Rafael J. Wysocki's avatar
      xen/pcifront: Use global PCI rescan-remove locking · a83919e0
      Rafael J. Wysocki authored
      Multiple race conditions are possible between the Xen pcifront device
      addition and removal and the generic PCI device addition and removal that
      can be triggered via sysfs.
      
      To avoid those race conditions make the Xen pcifront code use global PCI
      rescan-remove locking.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      a83919e0
    • Rafael J. Wysocki's avatar
      powerpc/eeh: Use global PCI rescan-remove locking · 1c2042c8
      Rafael J. Wysocki authored
      Race conditions are theoretically possible between the PCI device addition
      and removal in the PPC64 PCI error recovery driver and the generic PCI bus
      rescan and device removal that can be triggered via sysfs.
      
      To avoid those race conditions make PPC64 PCI error recovery driver use
      global PCI rescan-remove locking around PCI device addition and removal.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      1c2042c8
  2. 14 Jan, 2014 10 commits
  3. 13 Jan, 2014 9 commits
  4. 10 Jan, 2014 5 commits
    • Stephen Hemminger's avatar
      PCI: Remove unused ID-Based Ordering support · 7c2dd2d7
      Stephen Hemminger authored
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts b48d4425 ("PCI: add ID-based ordering enable/disable
      support"), removing these interfaces:
      
          pci_enable_ido()
          pci_disable_ido()
      
      [bhelgaas: split to separate patch, also remove prototypes from pci.h]
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      7c2dd2d7
    • Stephen Hemminger's avatar
      PCI: Remove unused Optimized Buffer Flush/Fill support · ecc86356
      Stephen Hemminger authored
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts 48a92a81 ("PCI: add OBFF enable/disable support"),
      removing these interfaces:
      
          pci_enable_obff()
          pci_disable_obff()
      
      [bhelgaas: split to separate patch, also remove prototypes from pci.h]
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      ecc86356
    • Stephen Hemminger's avatar
      PCI: Remove unused Latency Tolerance Reporting support · 3ea8197e
      Stephen Hemminger authored
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts 51c2e0a7 ("PCI: add latency tolerance reporting
      enable/disable support"), removing these interfaces:
      
          pci_enable_ltr()
          pci_disable_ltr()
          pci_set_ltr()
      
      [bhelgaas: split to separate patch, also remove prototypes from pci.h]
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      3ea8197e
    • Bjorn Helgaas's avatar
      Merge branch 'pci/resource' into next · 96702be5
      Bjorn Helgaas authored
      * pci/resource:
        PCI: Allocate 64-bit BARs above 4G when possible
        PCI: Enforce bus address limits in resource allocation
        PCI: Split out bridge window override of minimum allocation address
        agp/ati: Use PCI_COMMAND instead of hard-coded 4
        agp/intel: Use CPU physical address, not bus address, for ioremap()
        agp/intel: Use pci_bus_address() to get GTTADR bus address
        agp/intel: Use pci_bus_address() to get MMADR bus address
        agp/intel: Support 64-bit GMADR
        agp/intel: Rename gtt_bus_addr to gtt_phys_addr
        drm/i915: Rename gtt_bus_addr to gtt_phys_addr
        agp: Use pci_resource_start() to get CPU physical address for BAR
        agp: Support 64-bit APBASE
        PCI: Add pci_bus_address() to get bus address of a BAR
        PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
        PCI: Change pci_bus_region addresses to dma_addr_t
      96702be5
    • Stephen Hemminger's avatar
      PCI: Removed unused parts of Page Request Interface support · b340cacc
      Stephen Hemminger authored
      My philosophy is unused code is dead code.  And dead code is subject to bit
      rot and is a likely source of bugs.  Use it or lose it.
      
      This reverts parts of c320b976 ("PCI: Add implementation for PRI
      capability"), removing these interfaces:
      
          pci_pri_enabled()
          pci_pri_stopped()
          pci_pri_status()
      
      [bhelgaas: split to separate patch]
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      CC: Joerg Roedel <joro@8bytes.org>
      b340cacc
  5. 08 Jan, 2014 4 commits
  6. 07 Jan, 2014 9 commits