linux-stable/drivers
Shuah Khan 378080b7d8 misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
commit eb7f8e2842 upstream.

rtsx_usb driver allocates coherent dma buffer for urb transfers.
This buffer is passed to usb_bulk_msg() and usb core tries to
map already mapped buffer running into a dma mapping error.

xhci_hcd 0000:01:00.0: rejecting DMA map of vmalloc memory
WARNING: CPU: 1 PID: 279 at include/linux/dma-mapping.h:326 usb_ hcd_map_urb_for_dma+0x7d6/0x820

...

xhci_map_urb_for_dma+0x291/0x4e0
usb_hcd_submit_urb+0x199/0x12b0
...
usb_submit_urb+0x3b8/0x9e0
usb_start_wait_urb+0xe3/0x2d0
usb_bulk_msg+0x115/0x240
rtsx_usb_transfer_data+0x185/0x1a8 [rtsx_usb]
rtsx_usb_send_cmd+0xbb/0x123 [rtsx_usb]
rtsx_usb_write_register+0x12c/0x143 [rtsx_usb]
rtsx_usb_probe+0x226/0x4b2 [rtsx_usb]

Fix it to use kmalloc() to get DMA-able memory region instead.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/667d627d502e1ba9ff4f9b94966df3299d2d3c0d.1656642167.git.skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-12 16:35:17 +02:00
..
accessibility
acpi ACPI: video: Change how we determine if brightness key-presses are handled 2022-07-07 17:53:29 +02:00
amba
android
ata ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo() 2022-06-22 14:21:56 +02:00
atm atm: eni: Add check for dma_map_single 2022-03-23 09:16:41 +01:00
auxdisplay
base PM: runtime: Redefine pm_runtime_release_supplier() 2022-07-12 16:35:09 +02:00
bcma
block virtio-blk: modify the value type of num in virtio_queue_rq() 2022-07-12 16:35:11 +02:00
bluetooth Bluetooth: btmtksdio: fix use-after-free at btmtksdio_recv_event 2022-07-12 16:35:08 +02:00
bus bus: mhi: Fix pm_state conversion to string 2022-07-12 16:35:03 +02:00
cdrom
char random: update comment from copy_to_user() -> copy_to_iter() 2022-06-29 09:03:31 +02:00
clk clk: renesas: r9a07g044: Update multiplier and divider values for PLL2/3 2022-07-12 16:34:58 +02:00
clocksource clocksource/drivers/ixp4xx: remove EXPORT_SYMBOL_GPL from ixp4xx_timer_setup() 2022-07-07 17:53:32 +02:00
comedi comedi: vmk80xx: fix expression for tx buffer size 2022-06-22 14:22:03 +02:00
connector
counter
cpufreq drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c 2022-07-07 17:53:33 +02:00
cpuidle cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode 2022-06-09 10:22:33 +02:00
crypto crypto: sun8i-ss - handle zero sized sg 2022-06-09 10:23:11 +02:00
cxl cxl/port: Hold port reference until decoder release 2022-07-12 16:34:58 +02:00
dax dax: make sure inodes are flushed before destroy cache 2022-04-08 14:23:31 +02:00
dca
devfreq PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events 2022-07-07 17:53:27 +02:00
dio
dma dmaengine: imx-sdma: Allow imx8m for imx7 FW revs 2022-07-12 16:35:17 +02:00
dma-buf dma-buf/poll: Get a file reference for outstanding fence callbacks 2022-07-12 16:34:51 +02:00
edac EDAC/dmc520: Don't print an error for each unconfigured interrupt line 2022-06-09 10:22:47 +02:00
eisa
extcon extcon: Modify extcon device to be created after driver data is set 2022-06-14 18:36:22 +02:00
firewire firewire: core: extend card->lock in fw_core_handle_bus_reset 2022-05-12 12:30:05 +02:00
firmware firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle 2022-06-14 18:36:09 +02:00
fpga
fsi fsi: occ: Force sequence numbering per OCC 2022-07-07 17:53:32 +02:00
gnss
gpio gpio: winbond: Fix error code in winbond_gpio_get() 2022-06-29 09:03:26 +02:00
gpu drm/mediatek: Add vblank register/unregister callback functions 2022-07-12 16:35:07 +02:00
greybus greybus: svc: fix an error handling bug in gb_svc_hello() 2022-04-08 14:22:50 +02:00
hid HID: amd_sfh: Modify the hid name 2022-06-09 10:22:56 +02:00
hsi
hv Drivers: hv: vmbus: Release cpu lock in error case 2022-06-22 14:22:00 +02:00
hwmon hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails 2022-07-07 17:53:35 +02:00
hwspinlock
hwtracing coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier 2022-06-14 18:36:06 +02:00
i2c i2c: cadence: Unregister the clk notifier in error path 2022-07-12 16:35:16 +02:00
i3c
idle
iio iio: accel: mma8452: use the correct logic to get mma8452_data 2022-07-12 16:35:01 +02:00
infiniband RDMA/cm: Fix memory leak in ib_cm_insert_listen 2022-07-07 17:53:26 +02:00
input Input: goodix - try not to touch the reset-pin on x86/ACPI devices 2022-07-12 16:34:51 +02:00
interconnect interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate 2022-06-09 10:23:31 +02:00
iommu iommu/vt-d: Fix PCI bus rescan device hot add 2022-07-12 16:35:09 +02:00
ipack
irqchip irqchip/gic-v3: Refactor ISB + EOIR at ack time 2022-07-12 16:35:08 +02:00
isdn isdn: hfcpci: check the return value of dma_set_mask() in setup_hw() 2022-03-16 14:23:36 +01:00
leds
macintosh macintosh: via-pmu and via-cuda need RTC_LIB 2022-06-09 10:23:12 +02:00
mailbox mailbox: forward the hrtimer if not queued and under a lock 2022-06-09 10:23:12 +02:00
mcb
md dm raid: fix KASAN warning in raid5_add_disks 2022-07-07 17:53:24 +02:00
media media: davinci: vpif: fix use-after-free on driver unbind 2022-07-12 16:34:57 +02:00
memory memory: renesas-rpc-if: Avoid unaligned bus access for HyperFlash 2022-07-12 16:34:52 +02:00
memstick
message
mfd mfd: davinci_voicecodec: Fix possible null-ptr-deref davinci_vc_probe() 2022-06-09 10:23:12 +02:00
misc misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer 2022-07-12 16:35:17 +02:00
mmc mmc: mediatek: wait dma stop bit reset to 0 2022-06-29 09:03:19 +02:00
most
mtd mtd: spi-nor: Skip erase logic when SPI_NOR_NO_ERASE is set 2022-07-12 16:35:01 +02:00
mux
net r8169: fix accessing unset transport header 2022-07-12 16:35:16 +02:00
nfc NFC: nxp-nci: Don't issue a zero length i2c_master_read() 2022-07-07 17:53:28 +02:00
ntb
nubus
nvdimm nvdimm: Fix badblocks clear off-by-one error 2022-07-07 17:53:24 +02:00
nvme nvme-pci: add NVME_QUIRK_BOGUS_NID for ADATA IM2P33F8ABR1 2022-07-07 17:53:24 +02:00
nvmem
of of: overlay: do not break notify on NOTIFY_{OK|STOP} 2022-06-09 10:22:50 +02:00
opp OPP: call of_node_put() on error path in _bandwidth_supported() 2022-06-09 10:23:13 +02:00
parisc parisc: Fix CPU affinity for Lasi, WAX and Dino chips 2022-04-13 20:59:14 +02:00
parport
pci PCI: pciehp: Ignore Link Down/Up caused by error-induced Hot Reset 2022-07-12 16:34:52 +02:00
pcmcia pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards 2022-06-14 18:36:02 +02:00
perf arm_pmu: Validate single/group leader events 2022-04-27 14:39:00 +02:00
phy phy: qcom-qmp: fix pipe-clock imbalance on power-on failure 2022-06-14 18:36:06 +02:00
pinctrl pinctrl: sunxi: sunxi_pconf_set: use correct offset 2022-07-12 16:35:14 +02:00
platform platform/x86: wmi: Fix driver->notify() vs ->probe() race 2022-07-12 16:34:53 +02:00
pnp
power extcon: Fix extcon_get_extcon_dev() error handling 2022-06-14 18:36:21 +02:00
powercap
pps pps: clients: gpio: Propagate return value from pps_gpio_probe 2022-04-08 14:23:44 +02:00
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-13 20:59:01 +02:00
pwm pwm: raspberrypi-poe: Fix endianness in firmware struct 2022-06-14 18:36:04 +02:00
rapidio
ras
regulator regulator: scmi: Fix refcount leak in scmi_regulator_probe 2022-06-09 10:23:00 +02:00
remoteproc remoteproc: imx_rproc: Ignore create mem entry for resource table 2022-06-14 18:36:03 +02:00
reset reset: tegra-bpmp: Restore Handle errors in BPMP response 2022-04-27 14:38:55 +02:00
rpmsg rpmsg: qcom_smd: Fix returning 0 if irq_of_parse_and_map() fails 2022-06-14 18:36:05 +02:00
rtc rtc: ftrtc010: Fix error handling in ftrtc010_rtc_probe 2022-06-14 18:36:07 +02:00
s390 s390/stp: clock_delta should be signed 2022-06-09 10:23:21 +02:00
sbus
scsi scsi: qla2xxx: Fix loss of NVMe namespaces after driver reload test 2022-07-12 16:35:02 +02:00
sh
siox
slimbus slimbus: qcom: Fix IRQ check in qcom_slim_probe 2022-05-18 10:26:55 +02:00
soc ARM: at91: fix soc detection for SAM9X60 SiPs 2022-07-12 16:35:15 +02:00
soundwire soundwire: qcom: adjust autoenumeration timeout 2022-06-14 18:36:21 +02:00
spi spi: spi-fsl-qspi: check return value after calling platform_get_resource_byname() 2022-06-09 10:22:55 +02:00
spmi
ssb
staging staging: r8188eu: Fix warning of array overflow in ioctl_linux.c 2022-06-22 14:21:59 +02:00
target target: remove an incorrect unmap zeroes data deduction 2022-06-09 10:22:47 +02:00
tc
tee
thermal thermal: devfreq_cooling: use local ops instead of global ops 2022-06-09 10:23:26 +02:00
thunderbolt thunderbolt: Use different lane for second DisplayPort tunnel 2022-06-14 18:36:20 +02:00
tty tty: n_gsm: fix encoding of command/response bit 2022-07-12 16:35:11 +02:00
uio
usb usb: chipidea: udc: check request status before setting device address 2022-06-29 09:03:27 +02:00
vdpa vdpa/mlx5: Avoid processing works if workqueue was destroyed 2022-07-12 16:34:59 +02:00
vfio vfio/pci: Fix vf_token mechanism when device-specific VF drivers are used 2022-04-20 09:34:13 +02:00
vhost vringh: Fix loop descriptors check in the indirect cases 2022-06-14 18:36:24 +02:00
video fbcon: Prevent that screen size is smaller than font size 2022-07-12 16:35:09 +02:00
virt virt: acrn: fix a memory leak in acrn_dev_ioctl() 2022-04-08 14:23:50 +02:00
virtio virtio-pci: Remove wrong address verification in vp_del_vqs() 2022-06-22 14:22:05 +02:00
visorbus
vlynq
vme
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-13 20:59:11 +02:00
watchdog watchdog: wdat_wdt: Stop watchdog when rebooting the system 2022-06-14 18:36:22 +02:00
xen x86/xen: Remove undefined behavior in setup_features() 2022-06-29 09:03:24 +02:00
zorro
Kconfig
Makefile