Vivek Kasireddy
63d8c1933e
udmabuf: Set the DMA mask for the udmabuf device (v2)
commit 9e9fa6a9198b767b00f48160800128e83a038f9f upstream.
If the DMA mask is not set explicitly, the following warning occurs
when the userspace tries to access the dma-buf via the CPU as
reported by syzbot here:
WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188
__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted
5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0
83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45
31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f62fcf530f9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89
f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01
f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
v2: Dont't forget to deregister if DMA mask setup fails.
Reported-by: [email protected]
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Vivek Kasireddy <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
2022-09-05 10:27:45 +02:00 |
| .. |
|
accessibility
|
|
|
|
acpi
|
ACPI: processor: Remove freq Qos request for all CPUs
|
2022-09-05 10:27:44 +02:00 |
|
amba
|
|
|
|
android
|
|
|
|
ata
|
ata: libata-eh: Add missing command name
|
2022-08-25 11:18:18 +02:00 |
|
atm
|
atm: idt77252: fix use-after-free bugs caused by tst_timer
|
2022-08-25 11:18:26 +02:00 |
|
auxdisplay
|
|
|
|
base
|
driver core: fix potential deadlock in __driver_attach
|
2022-08-25 11:17:52 +02:00 |
|
bcma
|
|
|
|
block
|
loop: Check for overflow while configuring loop
|
2022-09-05 10:27:43 +02:00 |
|
bluetooth
|
Bluetooth: hci_intel: Add check for platform_driver_register
|
2022-08-25 11:17:47 +02:00 |
|
bus
|
bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe()
|
2022-08-25 11:17:35 +02:00 |
|
cdrom
|
|
|
|
char
|
random: update comment from copy_to_user() -> copy_to_iter()
|
2022-06-29 08:58:49 +02:00 |
|
clk
|
clk: qcom: ipq8074: dont disable gcc_sleep_clk_src
|
2022-08-25 11:18:33 +02:00 |
|
clocksource
|
clocksource/drivers/ixp4xx: remove EXPORT_SYMBOL_GPL from ixp4xx_timer_setup()
|
2022-07-07 17:36:53 +02:00 |
|
connector
|
|
|
|
counter
|
|
|
|
cpufreq
|
cpufreq: pmac32-cpufreq: Fix refcount leak bug
|
2022-07-21 20:59:24 +02:00 |
|
cpuidle
|
|
|
|
crypto
|
crypto: inside-secure - Add missing MODULE_DEVICE_TABLE for of
|
2022-08-25 11:17:48 +02:00 |
|
dax
|
dax: make sure inodes are flushed before destroy cache
|
2022-04-15 14:18:12 +02:00 |
|
dca
|
|
|
|
devfreq
|
PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events
|
2022-07-07 17:36:49 +02:00 |
|
dio
|
|
|
|
dma
|
dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed
|
2022-08-25 11:18:35 +02:00 |
|
dma-buf
|
udmabuf: Set the DMA mask for the udmabuf device (v2)
|
2022-09-05 10:27:45 +02:00 |
|
edac
|
EDAC/synopsys: Read the error count from the correct register
|
2022-04-27 13:50:48 +02:00 |
|
eisa
|
|
|
|
extcon
|
extcon: Modify extcon device to be created after driver data is set
|
2022-06-14 18:12:00 +02:00 |
|
firewire
|
firewire: core: extend card->lock in fw_core_handle_bus_reset
|
2022-05-12 12:23:41 +02:00 |
|
firmware
|
firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails
|
2022-08-25 11:18:15 +02:00 |
|
fpga
|
fpga: altera-pr-ip: fix unsigned comparison with less than zero
|
2022-08-25 11:17:51 +02:00 |
|
fsi
|
|
|
|
gnss
|
|
|
|
gpio
|
gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data()
|
2022-08-25 11:17:57 +02:00 |
|
gpu
|
drm/meson: Fix overflow implicit truncation warnings
|
2022-08-25 11:18:32 +02:00 |
|
greybus
|
greybus: svc: fix an error handling bug in gb_svc_hello()
|
2022-04-15 14:17:58 +02:00 |
|
hid
|
HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report
|
2022-09-05 10:27:45 +02:00 |
|
hsi
|
|
|
|
hv
|
random: remove unused irq_flags argument from add_interrupt_randomness()
|
2022-06-22 14:11:06 +02:00 |
|
hwmon
|
hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails
|
2022-07-07 17:36:50 +02:00 |
|
hwspinlock
|
|
|
|
hwtracing
|
intel_th: pci: Add Meteor Lake-P support
|
2022-08-25 11:18:13 +02:00 |
|
i2c
|
i2c: mux-gpmux: Add of_node_put() when breaking out of loop
|
2022-08-25 11:17:47 +02:00 |
|
i3c
|
|
|
|
ide
|
|
|
|
idle
|
|
|
|
iio
|
iio: light: isl29028: Fix the warning in isl29028_remove()
|
2022-08-25 11:17:24 +02:00 |
|
infiniband
|
RDMA/rxe: Fix error unwind in rxe_create_qp()
|
2022-08-25 11:17:59 +02:00 |
|
input
|
Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
|
2022-06-14 18:12:03 +02:00 |
|
interconnect
|
|
|
|
iommu
|
iommu/vt-d: avoid invalid memory access via node_online(NUMA_NO_NODE)
|
2022-08-25 11:18:15 +02:00 |
|
ipack
|
|
|
|
irqchip
|
irqchip/tegra: Fix overflow implicit truncation warnings
|
2022-08-25 11:18:32 +02:00 |
|
isdn
|
|
|
|
leds
|
|
|
|
lightnvm
|
lightnvm: disable the subsystem
|
2022-05-09 09:03:20 +02:00 |
|
macintosh
|
macintosh/adb: fix oob read in do_adb_query() function
|
2022-08-11 12:57:53 +02:00 |
|
mailbox
|
mailbox: forward the hrtimer if not queued and under a lock
|
2022-06-14 18:11:42 +02:00 |
|
mcb
|
|
|
|
md
|
md: call __md_stop_writes in md_stop
|
2022-09-05 10:27:44 +02:00 |
|
media
|
media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment
|
2022-08-25 11:17:42 +02:00 |
|
memory
|
memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe
|
2022-04-20 09:19:34 +02:00 |
|
memstick
|
memstick/ms_block: Fix a memory leak
|
2022-08-25 11:17:55 +02:00 |
|
message
|
|
|
|
mfd
|
mfd: max77620: Fix refcount leak in max77620_initialise_fps
|
2022-08-25 11:18:04 +02:00 |
|
misc
|
cxl: Fix a memory leak in an error handling path
|
2022-08-25 11:18:34 +02:00 |
|
mmc
|
mmc: pxamci: Fix an error handling path in pxamci_probe()
|
2022-08-25 11:18:19 +02:00 |
|
mtd
|
mtd: st_spi_fsm: Add a clk_disable_unprepare() in .probe()'s error path
|
2022-08-25 11:17:51 +02:00 |
|
mux
|
|
|
|
net
|
ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter
|
2022-09-05 10:27:42 +02:00 |
|
nfc
|
NFC: nxp-nci: don't print header length mismatch on i2c error
|
2022-07-21 20:59:25 +02:00 |
|
ntb
|
NTB: ntb_tool: uninitialized heap data in tool_fn_write()
|
2022-08-25 11:18:26 +02:00 |
|
nubus
|
|
|
|
nvdimm
|
nvdimm: Fix badblocks clear off-by-one error
|
2022-07-07 17:36:48 +02:00 |
|
nvme
|
nvmet-tcp: fix lockdep complaint on nvmet_tcp_wq flush during queue teardown
|
2022-08-25 11:18:35 +02:00 |
|
nvmem
|
|
|
|
of
|
of: overlay: do not break notify on NOTIFY_{OK|STOP}
|
2022-06-14 18:11:34 +02:00 |
|
opp
|
opp: Fix error check in dev_pm_opp_attach_genpd()
|
2022-08-25 11:18:00 +02:00 |
|
oprofile
|
|
|
|
parisc
|
parisc: Fix CPU affinity for Lasi, WAX and Dino chips
|
2022-04-15 14:18:36 +02:00 |
|
parport
|
|
|
|
pci
|
PCI: Add ACS quirk for Broadcom BCM5750x NICs
|
2022-08-25 11:18:31 +02:00 |
|
pcmcia
|
pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
|
2022-06-14 18:11:50 +02:00 |
|
perf
|
arm_pmu: Validate single/group leader events
|
2022-04-27 13:50:50 +02:00 |
|
phy
|
phy: qcom-qmp: fix pipe-clock imbalance on power-on failure
|
2022-06-14 18:11:52 +02:00 |
|
pinctrl
|
pinctrl: amd: Don't save/restore interrupt status and wake status bits
|
2022-09-05 10:27:39 +02:00 |
|
platform
|
platform/olpc: Fix uninitialized data in debugfs write
|
2022-08-25 11:17:58 +02:00 |
|
pnp
|
|
|
|
power
|
power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe
|
2022-07-29 17:14:10 +02:00 |
|
powercap
|
|
|
|
pps
|
|
|
|
ps3
|
|
|
|
ptp
|
ptp: replace snprintf with sysfs_emit
|
2022-04-15 14:18:32 +02:00 |
|
pwm
|
pwm: lp3943: Fix duty calculation in case period was clamped
|
2022-06-14 18:11:51 +02:00 |
|
rapidio
|
|
|
|
ras
|
|
|
|
regulator
|
regulator: of: Fix refcount leak bug in of_get_regulation_constraints()
|
2022-08-25 11:17:36 +02:00 |
|
remoteproc
|
remoteproc: qcom: wcnss: Fix handling of IRQs
|
2022-08-25 11:18:02 +02:00 |
|
reset
|
reset: tegra-bpmp: Restore Handle errors in BPMP response
|
2022-04-27 13:50:47 +02:00 |
|
rpmsg
|
rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge
|
2022-08-25 11:18:04 +02:00 |
|
rtc
|
rtc: mt6397: check return value after calling platform_get_resource()
|
2022-06-14 18:11:53 +02:00 |
|
s390
|
scsi: zfcp: Fix missing auto port scan and thus missing target ports
|
2022-08-25 11:18:10 +02:00 |
|
sbus
|
|
|
|
scsi
|
scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq
|
2022-09-05 10:27:44 +02:00 |
|
sfi
|
|
|
|
sh
|
|
|
|
siox
|
|
|
|
slimbus
|
slimbus: qcom: Fix IRQ check in qcom_slim_probe
|
2022-05-18 09:47:27 +02:00 |
|
soc
|
soc: qcom: aoss: Fix refcount leak in qmp_cooling_devices_register
|
2022-08-25 11:17:35 +02:00 |
|
soundwire
|
soundwire: bus_type: fix remove and shutdown support
|
2022-08-25 11:17:54 +02:00 |
|
spi
|
spi: spi-rspi: Fix PIO fallback on RZ platforms
|
2022-08-25 11:17:32 +02:00 |
|
spmi
|
|
|
|
ssb
|
|
|
|
staging
|
staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback
|
2022-08-25 11:17:55 +02:00 |
|
target
|
scsi: target: tcmu: Fix possible page UAF
|
2022-04-20 09:19:36 +02:00 |
|
tc
|
|
|
|
tee
|
tee: add overflow check in register_shm_helper()
|
2022-08-25 11:18:27 +02:00 |
|
thermal
|
thermal: sysfs: Fix cooling_device_stats_setup() error code path
|
2022-08-25 11:17:22 +02:00 |
|
thunderbolt
|
|
|
|
tty
|
tty: serial: Fix refcount leak bug in ucc_uart.c
|
2022-08-25 11:18:36 +02:00 |
|
uio
|
|
|
|
usb
|
usb: cdns3: Fix issue for clear halt endpoint
|
2022-09-05 10:27:38 +02:00 |
|
vfio
|
vfio: Clear the caps->buf to NULL after free
|
2022-08-25 11:18:36 +02:00 |
|
vhost
|
vringh: Fix loop descriptors check in the indirect cases
|
2022-06-14 18:12:02 +02:00 |
|
video
|
video: fbdev: i740fb: Check the argument of i740_calc_vclk()
|
2022-08-25 11:18:38 +02:00 |
|
virt
|
vboxguest: Do not use devm for irq
|
2022-08-25 11:18:33 +02:00 |
|
virtio
|
virtio_mmio: Restore guest page size on resume
|
2022-07-21 20:59:24 +02:00 |
|
visorbus
|
|
|
|
vlynq
|
|
|
|
vme
|
|
|
|
w1
|
w1: w1_therm: fixes w1_seq for ds28ea00 sensors
|
2022-04-15 14:18:35 +02:00 |
|
watchdog
|
watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe()
|
2022-08-25 11:18:06 +02:00 |
|
xen
|
xen/xenbus: fix return type in xenbus_file_read()
|
2022-08-25 11:18:26 +02:00 |
|
zorro
|
|
|
|
Kconfig
|
|
|
|
Makefile
|
|
|