linux/drivers/usb
Hongyu Xie 243a1dd7ba xhci: Prevent futile URB re-submissions due to incorrect return value.
The -ENODEV return value from xhci_check_args() is incorrectly changed
to -EINVAL in a couple places before propagated further.

xhci_check_args() returns 4 types of value, -ENODEV, -EINVAL, 1 and 0.
xhci_urb_enqueue and xhci_check_streams_endpoint return -EINVAL if
the return value of xhci_check_args <= 0.
This causes problems for example r8152_submit_rx, calling usb_submit_urb
in drivers/net/usb/r8152.c.
r8152_submit_rx will never get -ENODEV after submiting an urb when xHC
is halted because xhci_urb_enqueue returns -EINVAL in the very beginning.

[commit message and header edit -Mathias]

Fixes: 203a86613f ("xhci: Avoid NULL pointer deref when host dies.")
Cc: stable@vger.kernel.org
Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220215123320.1253947-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-15 15:13:20 +01:00
..
atm exit: Rename complete_and_exit to kthread_complete_and_exit 2021-12-13 12:04:45 -06:00
c67x00 usb/c67x00: Replace tasklet with work 2021-01-26 18:36:37 +01:00
cdns3 usb: cdnsp: Fix segmentation fault in cdns_lost_power function 2022-01-26 14:11:16 +01:00
chipidea USB/Thunderbolt changes for 5.17-rc1 2022-01-12 11:27:57 -08:00
class tty: tty_io: Switch to vmalloc() fallback in case of TTY_NO_WRITE_SPLIT 2021-12-21 09:18:44 +01:00
common usb: ulpi: Call of_node_put correctly 2022-01-31 14:11:20 +01:00
core usb: core: Unregister device on component_add() failure 2022-02-11 10:57:21 +01:00
dwc2 Revert "usb: dwc2: drd: fix soft connect when gadget is unconfigured" 2022-02-12 10:08:54 +01:00
dwc3 usb: dwc3: pci: Add "snps,dis_u2_susphy_quirk" for Intel Bay Trail 2022-02-15 15:12:38 +01:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-17 16:29:11 +01:00
gadget usb: gadget: rndis: check size of RNDIS_MSG_SET command 2022-02-11 10:59:17 +01:00
host xhci: Prevent futile URB re-submissions due to incorrect return value. 2022-02-15 15:13:20 +01:00
image scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions 2021-10-16 21:32:16 -04:00
isp1760 usb: isp1760: Use platform_get_irq() to get the interrupt 2021-12-21 08:51:57 +01:00
misc usb: usb251xb: add boost-up property support 2022-01-31 14:22:49 +01:00
mon
mtu3 usb: mtu3: set interval of FS intr and isoc endpoint 2021-12-21 09:05:45 +01:00
musb usb: musb: dsps: Use platform_get_irq_byname() to get the interrupt 2021-12-21 08:51:57 +01:00
phy usb: Remove redundant 'flush_workqueue()' calls 2021-11-17 14:36:57 +01:00
renesas_usbhs usb: renesas_usbhs: Use platform_get_irq() to get the interrupt 2021-12-21 08:51:57 +01:00
roles usb: roles: add helper usb_role_string() 2021-05-27 09:17:18 +02:00
serial USB: serial: cp210x: add CPI Bulk Coin Recycler id 2022-02-01 11:56:23 +01:00
storage usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge 2022-01-25 18:42:52 +01:00
typec ucsi_ccg: Check DEV_INT bit only when starting CCG4 2022-01-26 13:41:19 +01:00
usbip usb: Remove redundant 'flush_workqueue()' calls 2021-11-17 14:36:57 +01:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00