linux_dsm_epyc7002/drivers/usb
Mathias Nyman 57ea7b257a xhci: fix bounce buffer usage for non-sg list case
commit d4a610635400ccc382792f6be69427078541c678 upstream.

xhci driver may in some special cases need to copy small amounts
of payload data to a bounce buffer in order to meet the boundary
and alignment restrictions set by the xHCI specification.

In the majority of these cases the data is in a sg list, and
driver incorrectly assumed data is always in urb->sg when using
the bounce buffer.

If data instead is contiguous, and in urb->transfer_buffer, we may still
need to bounce buffer a small part if data starts very close (less than
packet size) to a 64k boundary.

Check if sg list is used before copying data to/from it.

Fixes: f9c589e142 ("xhci: TD-fragment, align the unsplittable case with a bounce buffer")
Cc: stable@vger.kernel.org
Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210203113702.436762-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-10 09:29:17 +01:00
..
atm usb: atm: don't use snprintf() for sysfs attrs 2020-08-25 19:11:18 +02:00
c67x00 Linux 5.9-rc3 2020-08-31 07:11:45 +02:00
cdns3 usb: cdns3: imx: fix can't create core device the second time issue 2021-01-27 11:55:17 +01:00
chipidea usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() 2021-01-12 20:18:19 +01:00
class USB: usblp: don't call usb_set_interface if there's a single alt 2021-02-10 09:29:10 +01:00
common usb: common: usb-conn-gpio: Print error on failure to get VBUS 2020-08-18 12:13:44 +02:00
core USB: add RESET_RESUME quirk for Snapscan 1212 2020-12-21 13:30:07 +01:00
dwc2 usb: dwc2: Fix endpoint direction check in ep_from_windex 2021-02-10 09:29:10 +01:00
dwc3 usb: dwc3: fix clock issue during resume in OTG mode 2021-02-10 09:29:10 +01:00
early usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic() 2020-09-25 16:29:09 +02:00
gadget usb: gadget: aspeed: add missing of_node_put 2021-02-10 09:29:10 +01:00
host xhci: fix bounce buffer usage for non-sg list case 2021-02-10 09:29:17 +01:00
image USB: microtek: use set_host_byte() 2020-09-16 12:42:10 +02:00
isp1760 usb: isp1760-hcd: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
misc USB: yurex: fix control-URB timeout handling 2021-01-12 20:18:20 +01:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 usb: mtu3: fix memory corruption in mtu3_debugfs_regset() 2020-12-26 16:02:38 +01:00
musb Revert "usb: musb: convert to devm_platform_ioremap_resource_byname" 2020-11-13 14:30:23 +01:00
phy usb: phy: phy-ab8500-usb: fix spello of "function" 2020-10-02 09:57:41 +03:00
renesas_usbhs usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop() 2021-02-10 09:29:10 +01:00
roles device connection: Remove struct device_connection 2020-09-07 11:14:09 +02:00
serial USB: serial: option: Adding support for Cinterion MV31 2021-02-10 09:29:10 +01:00
storage usb: uas: Add PNY USB Portable SSD to unusual_uas 2021-01-12 20:18:19 +01:00
typec usb: typec: Fix copy paste error for NVIDIA alt-mode description 2021-01-19 18:27:27 +01:00
usbip usb: usbip: vhci_hcd: protect shift size 2021-01-12 20:18:19 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00