linux-stable/drivers/usb
Yoshihiro Shimoda f9dc5e708a usb: renesas_usbhs: getting residue from callback_result
[ Upstream commit ea0efd687b ]

This driver assumed that dmaengine_tx_status() could return
the residue even if the transfer was completed. However,
this was not correct usage [1] and this caused to break getting
the residue after the commit 24461d9792 ("dmaengine:
virt-dma: Fix access after free in vchan_complete()") actually.
So, this is possible to get wrong received size if the usb
controller gets a short packet. For example, g_zero driver
causes "bad OUT byte" errors.

The usb-dmac driver will support the callback_result, so this
driver can use it to get residue correctly. Note that even if
the usb-dmac driver has not supported the callback_result yet,
this patch doesn't cause any side-effects.

[1]
https://lore.kernel.org/dmaengine/20200616165550.GP2324254@vkoul-mobl/

Reported-by: Hien Dang <hien.dang.eb@renesas.com>
Fixes: 24461d9792 ("dmaengine: virt-dma: Fix access after free in vchan_complete()")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1592482277-19563-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:37:00 -04:00
..
atm USB: atm: ueagle-atm: add missing endpoint check 2019-12-17 19:55:44 +01:00
c67x00
cdns3 usb: cdns3: ep0: add spinlock for cdns3_check_new_setup 2020-06-30 15:36:50 -04:00
chipidea usb: chipidea: msm: Ensure proper controller reset using role switch API 2020-05-14 07:58:25 +02:00
class cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip 2020-06-30 15:36:52 -04:00
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-17 19:55:39 +01:00
core usb: add USB_QUIRK_DELAY_INIT for Logitech C922 2020-06-30 15:36:48 -04:00
dwc2 usb: dwc2: Postponed gadget registration to the udc class driver 2020-06-30 15:36:48 -04:00
dwc3 usb: dwc3: gadget: Properly handle failed kick_transfer 2020-06-24 17:50:23 +02:00
early USB: early: Handle AMD's spec-compliant identifiers, too 2020-04-29 16:33:13 +02:00
gadget usb: gadget: udc: Potential Oops in error handling code 2020-06-30 15:37:00 -04:00
host xhci: Return if xHCI doesn't support LPM 2020-06-30 15:36:52 -04:00
image USB: microtek: fix info-leak at probe 2019-10-04 11:02:58 +02:00
isp1760 usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
misc USB: sisusbvga: Change port variable from signed to unsigned 2020-04-29 16:33:13 +02:00
mon usb: mon: Fix a deadlock in usbmon between mmap and read 2019-12-17 19:55:49 +01:00
mtu3 usb: mtu3: fix missing include of mtu3_dr.h 2019-10-27 08:58:44 +02:00
musb usb: musb: Fix runtime PM imbalance on error 2020-06-10 20:24:56 +02:00
phy usb: phy: twl6030-usb: Fix a resource leak in an error handling path in 'twl6030_usb_probe()' 2020-06-03 08:21:12 +02:00
renesas_usbhs usb: renesas_usbhs: getting residue from callback_result 2020-06-30 15:37:00 -04:00
roles usb: roles: fix a potential use after free 2019-12-17 19:55:46 +01:00
serial USB: serial: ch341: add basis for quirk detection 2020-06-10 20:24:55 +02:00
storage USB: uas: add quirk for LaCie 2Big Quadra 2020-05-14 07:58:25 +02:00
typec usb: typec: tcpci_rt1711h: avoid screaming irq causing boot hangs 2020-06-30 15:36:49 -04:00
usbip usbip: Fix error path of vhci_recv_ret_submit() 2019-12-31 16:46:05 +01:00
Kconfig usb: common: create Kconfig file 2019-09-03 19:00:39 +02:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00