1. 10 11月, 2018 2 次提交
  2. 28 9月, 2018 1 次提交
  3. 25 6月, 2018 1 次提交
  4. 25 5月, 2018 6 次提交
  5. 14 5月, 2018 1 次提交
    • M
      xhci: Fix USB3 NULL pointer dereference at logical disconnect. · 2278446e
      Mathias Nyman 提交于
      Hub driver will try to disable a USB3 device twice at logical disconnect,
      racing with xhci_free_dev() callback from the first port disable.
      
      This can be triggered with "udisksctl power-off --block-device <disk>"
      or by writing "1" to the "remove" sysfs file for a USB3 device
      in 4.17-rc4.
      
      USB3 devices don't have a similar disabled link state as USB2 devices,
      and use a U3 suspended link state instead. In this state the port
      is still enabled and connected.
      
      hub_port_connect() first disconnects the device, then later it notices
      that device is still enabled (due to U3 states) it will try to disable
      the port again (set to U3).
      
      The xhci_free_dev() called during device disable is async, so checking
      for existing xhci->devs[i] when setting link state to U3 the second time
      was successful, even if device was being freed.
      
      The regression was caused by, and whole thing revealed by,
      Commit 44a182b9 ("xhci: Fix use-after-free in xhci_free_virt_device")
      which sets xhci->devs[i]->udev to NULL before xhci_virt_dev() returned.
      and causes a NULL pointer dereference the second time we try to set U3.
      
      Fix this by checking xhci->devs[i]->udev exists before setting link state.
      
      The original patch went to stable so this fix needs to be applied there as
      well.
      
      Fixes: 44a182b9 ("xhci: Fix use-after-free in xhci_free_virt_device")
      Cc: <stable@vger.kernel.org>
      Reported-by: NJordan Glover <Golden_Miller83@protonmail.ch>
      Tested-by: NJordan Glover <Golden_Miller83@protonmail.ch>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2278446e
  6. 16 2月, 2018 2 次提交
  7. 09 12月, 2017 3 次提交
  8. 07 11月, 2017 1 次提交
    • G
      USB: host: xhci: Remove redundant license text · 9ed64195
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all USB files, that identifies the license
      in a specific and legally-defined manner.  So the extra GPL text wording
      can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Acked-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9ed64195
  9. 04 11月, 2017 1 次提交
  10. 02 11月, 2017 1 次提交
  11. 17 10月, 2017 1 次提交
  12. 05 10月, 2017 2 次提交
  13. 18 9月, 2017 2 次提交
  14. 28 8月, 2017 1 次提交
    • J
      usb: xhci: Support enabling of compliance mode for xhci 1.1 · 4b562bd2
      Jack Pham 提交于
      To perform SuperSpeed compliance testing the port should first
      be placed into compliance mode. For xHCI 1.0 and prior this
      transition happens automatically when the port is in Training
      and encounters an LFPS timeout. Thus running compliance tests
      against a test appliance may simply just work by simply plugging
      in to the downstream port.
      
      However starting with xHCI 1.1 the transition from Polling.LFPS
      to compliance mode may be disabled by default and needs to be
      explicitly enabled by writing to the PLS field of the PORTSC
      register, which sets an internal 'CTE' (Compliance Transition
      Enabled) flag so that the port will perform the transition the
      next time it encounters LFPS timeout. Whether this is disabled or
      not is determined by the 'CTC' (Compliance Transition Capability)
      bit in the HCCPARAMS2 capability register.
      
      In order to allow a test operator to change this if needed, allow
      a test driver (such as drivers/usb/misc/lvstest.c) to send a
      SET_FEATURE(PORT_LINK_STATE) control message to the root hub to
      update the link state prior to connecting to the port. Subsequently,
      placing the port in warm reset would then disable the flag.
      Signed-off-by: NJack Pham <jackp@codeaurora.org>
      Acked-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4b562bd2
  15. 17 8月, 2017 1 次提交
  16. 20 7月, 2017 3 次提交
  17. 20 6月, 2017 1 次提交
  18. 18 5月, 2017 1 次提交
  19. 18 4月, 2017 1 次提交
  20. 08 4月, 2017 4 次提交
  21. 25 1月, 2017 4 次提交