1. 23 3月, 2015 36 次提交
  2. 21 3月, 2015 1 次提交
  3. 20 3月, 2015 3 次提交
    • R
      Revert "x86/PCI: Refine the way to release PCI IRQ resources" · 9e8ce4b9
      Rafael J. Wysocki 提交于
      Commit b4b55cda (Refine the way to release PCI IRQ resources)
      introduced a regression in the PCI IRQ resource management by causing
      the IRQ resource of a device, established when pci_enabled_device()
      is called on a fully disabled device, to be released when the driver
      is unbound from the device, regardless of the enable_cnt.
      
      This leads to the situation that an ill-behaved driver can now make a
      device unusable to subsequent drivers by an imbalance in their use of
      pci_enable/disable_device().  That is a serious problem for secondary
      drivers like vfio-pci, which are innocent of the transgressions of
      the previous driver.
      
      Since the solution of this problem is not immediate and requires
      further discussion, revert commit b4b55cda and the issue it was
      supposed to address (a bug related to xen-pciback) will be taken
      care of in a different way going forward.
      Reported-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9e8ce4b9
    • C
      target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0 · 9bc6548f
      Christophe Vu-Brugier 提交于
      A check that rejects a CDB with FUA bit set if no write cache is
      emulated was added by the following commit:
      
        fde9f50f target: Add sanity checks for DPO/FUA bit usage
      
      The condition is as follows:
      
        if (!dev->dev_attrib.emulate_fua_write ||
            !dev->dev_attrib.emulate_write_cache)
      
      However, this check is wrong if the backend device supports WCE but
      "emulate_write_cache" is disabled.
      
      This patch uses se_dev_check_wce() (previously named
      spc_check_dev_wce) to invoke transport->get_write_cache() if the
      device has a write cache or check the "emulate_write_cache" attribute
      otherwise.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NChristophe Vu-Brugier <cvubrugier@fastmail.fm>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9bc6548f
    • N
      target: Fix virtual LUN=0 target_configure_device failure OOPs · 5f7da044
      Nicholas Bellinger 提交于
      This patch fixes a NULL pointer dereference triggered by a late
      target_configure_device() -> alloc_workqueue() failure that results
      in target_free_device() being called with DF_CONFIGURED already set,
      which subsequently OOPses in destroy_workqueue() code.
      
      Currently this only happens at modprobe target_core_mod time when
      core_dev_setup_virtual_lun0() -> target_configure_device() fails,
      and the explicit target_free_device() gets called.
      
      To address this bug originally introduced by commit 0fd97ccf, go
      ahead and move DF_CONFIGURED to end of target_configure_device()
      code to handle this special failure case.
      Reported-by: NClaudio Fleiner <cmf@daterainc.com>
      Cc: Claudio Fleiner <cmf@daterainc.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org> # v3.7+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5f7da044