linux/drivers/usb/musb
Mans Rullgard 52974d94a2 usb: musb: fix crash with highmen PIO and usbmon
When handling a PIO bulk transfer with highmem buffer, a temporary
mapping is assigned to urb->transfer_buffer.  After the transfer is
complete, an invalid address is left behind in this pointer.  This is
not ordinarily a problem since nothing touches that buffer before the
urb is released.  However, when usbmon is active, usbmon_urb_complete()
calls (indirectly) mon_bin_get_data() which does access the transfer
buffer if it is set.  To prevent an invalid memory access here, reset
urb->transfer_buffer to NULL when finished (musb_host_rx()), or do not
set it at all (musb_host_tx()).

Fixes: 8e8a551654 ("usb: musb: host: Handle highmem in PIO mode")
Signed-off-by: Mans Rullgard <mans@mansr.com>
Cc: stable@vger.kernel.org
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20200316211136.2274-8-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17 20:03:28 +01:00
..
am35x.c
cppi_dma.c
cppi_dma.h
da8xx.c
davinci.c usb: musb: davinci: Convert to use GPIO descriptor 2020-01-15 14:47:00 +01:00
davinci.h
jz4740.c usb: musb: jz4740: Add support for the JZ4770 2020-03-17 20:03:28 +01:00
Kconfig usb: musb: jz4740: Unconditionally depend on devicetree 2020-03-17 20:03:27 +01:00
Makefile usb: musb: remove dummy driver musb_am335x.c 2020-01-15 14:47:00 +01:00
mediatek.c usb: musb: remove redundant assignment to variable ret 2020-03-17 20:03:27 +01:00
musb_core.c usb: musb: core: remove useless cast for driver.name 2020-02-19 11:10:27 +01:00
musb_core.h usb: musb: Add musb_clearb/w() interface 2020-01-15 14:46:59 +01:00
musb_cppi41.c
musb_debug.h
musb_debugfs.c usb: musb: create debugfs directory under usb root 2019-11-21 18:20:29 +01:00
musb_dma.h usb: musb: Add noirq type of dma create interface 2020-01-15 14:46:59 +01:00
musb_dsps.c usb: musb: dsps: create debugfs directory under usb root 2019-11-14 11:16:35 +08:00
musb_gadget_ep0.c
musb_gadget.c usb: Spelling s/enpoint/endpoint/ 2019-11-04 15:53:00 +01:00
musb_gadget.h
musb_host.c usb: musb: fix crash with highmen PIO and usbmon 2020-03-17 20:03:28 +01:00
musb_host.h
musb_io.h usb: musb: Add musb_clearb/w() interface 2020-01-15 14:46:59 +01:00
musb_regs.h
musb_trace.c
musb_trace.h USB: musb: fix __iomem in trace functions 2020-01-15 14:46:58 +01:00
musb_virthub.c
musbhsdma.c usb: musb: Add musb_clearb/w() interface 2020-01-15 14:46:59 +01:00
omap2430.c usb: musb: Get rid of omap2430_musb_set_vbus() 2020-01-15 14:46:56 +01:00
omap2430.h
sunxi.c usb: musb: Add musb_clearb/w() interface 2020-01-15 14:46:59 +01:00
tusb6010_omap.c
tusb6010.c usb: musb: Add musb_clearb/w() interface 2020-01-15 14:46:59 +01:00
tusb6010.h
ux500_dma.c usb: musb/ux500: Use dma_request_chan() instead dma_request_slave_channel() 2020-01-15 14:46:58 +01:00
ux500.c