android_kernel_xiaomi_sm8450/drivers
Rob Clark 0df5eaab03 dma-buf/sw_sync: Avoid recursive lock during fence signal
[ Upstream commit e531fdb5cd5ee2564b7fe10c8a9219e2b2fac61e ]

If a signal callback releases the sw_sync fence, that will trigger a
deadlock as the timeline_fence_release recurses onto the fence->lock
(used both for signaling and the the timeline tree).

To avoid that, temporarily hold an extra reference to the signalled
fences until after we drop the lock.

(This is an alternative implementation of https://patchwork.kernel.org/patch/11664717/
which avoids some potential UAF issues with the original patch.)

v2: Remove now obsolete comment, use list_move_tail() and
    list_del_init()

Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: d3c6dd1fb3 ("dma-buf/sw_sync: Synchronize signal vs syncpt free")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230818145939.39697-1-robdclark@gmail.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-30 16:23:19 +02:00
..
accessibility speakup: fix a segfault caused by switching consoles 2022-11-25 17:45:50 +01:00
acpi ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2023-08-11 11:57:44 +02:00
amba
android binder: fix memory leak in binder_init() 2023-08-16 18:21:00 +02:00
ata ata: pata_ns87415: mark ns87560_tf_read static 2023-08-11 11:57:38 +02:00
atm atm: idt77252: fix kmemleak when rmmod idt77252 2023-04-05 11:23:35 +02:00
auxdisplay
base PM: sleep: wakeirq: fix wake irq arming 2023-08-11 11:57:55 +02:00
bcma
block rbd: prevent busy loop when requesting exclusive lock 2023-08-30 16:23:12 +02:00
bluetooth Bluetooth: btusb: Add MT7922 bluetooth ID for the Asus Ally 2023-08-26 15:26:46 +02:00
bus bus: ti-sysc: Flush posted write on enable before reset 2023-08-26 15:26:53 +02:00
cdrom
char tpm_tis: Explicitly check for error code 2023-08-11 11:57:42 +02:00
clk clk: Fix slab-out-of-bounds error in devm_clk_release() 2023-08-30 16:23:14 +02:00
clocksource clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe 2023-07-27 08:43:33 +02:00
connector
counter counter: 104-quad-8: Fix race condition between FLAG and CNTR reads 2023-05-17 11:47:28 +02:00
cpufreq cpufreq: intel_pstate: Drop ACPI _PSS states table patching 2023-08-11 11:57:44 +02:00
cpuidle cpuidle: psci: Iterate backwards over list in psci_pd_remove() 2023-03-22 13:30:05 +01:00
crypto crypto: marvell/cesa - Fix type mismatch warning 2023-07-27 08:44:00 +02:00
dax dax: Introduce alloc_dev_dax_id() 2023-07-27 08:44:00 +02:00
dca
devfreq PM/devfreq: governor: Add a private governor_data for governor 2023-01-14 10:16:31 +01:00
dio drivers: dio: fix possible memory leak in dio_init() 2023-01-14 10:15:54 +01:00
dma dmaengine: mcf-edma: Fix a potential un-allocated memory access 2023-08-16 18:21:02 +02:00
dma-buf dma-buf/sw_sync: Avoid recursive lock during fence signal 2023-08-30 16:23:19 +02:00
edac EDAC/skx: Fix overflows on the DRAM row address mapping arrays 2023-05-17 11:47:39 +02:00
eisa
extcon extcon: Fix kernel doc of property capability fields to avoid warnings 2023-07-27 08:44:04 +02:00
firewire firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region 2023-02-15 17:22:09 +01:00
firmware firmware: stratix10-svc: Fix a potential resource leak in svc_create_memory_pool() 2023-07-27 08:44:30 +02:00
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-17 11:47:55 +02:00
fsi WRITE is "data source", not destination... 2023-02-15 17:22:11 +01:00
gnss
gpio gpio: tps68470: Make tps68470_gpio_output() always set the initial value 2023-08-11 11:57:31 +02:00
gpu drm/i915: Fix premature release of request's reusable memory 2023-08-30 16:23:18 +02:00
greybus
hid HID: add quirk for 03f0:464a HP Elite Presenter Mouse 2023-08-26 15:26:43 +02:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2023-01-14 10:16:03 +01:00
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:28:07 +02:00
hwmon hwmon: (pmbus/bel-pfe) Enable PMBUS_SKIP_STATUS_CHECK for pfe1100 2023-08-16 18:20:59 +02:00
hwspinlock hwspinlock: qcom: correct MMIO max register for newer SoCs 2022-11-16 09:57:07 +01:00
hwtracing coresight: Fix loss of connection info when a module is unloaded 2023-07-27 08:44:05 +02:00
i2c i2c: designware: Handle invalid SMBus block data response length value 2023-08-26 15:26:51 +02:00
i3c
ide
idle
iio iio: addac: stx104: Fix race condition when converting analog-to-digital 2023-08-26 15:26:47 +02:00
infiniband RDMA/mlx5: Return the firmware result upon destroying QP/RQ 2023-08-26 15:26:44 +02:00
input Input: adxl34x - do not hardcode interrupt trigger type 2023-07-27 08:43:46 +02:00
interconnect interconnect: qcom: osm-l3: fix icc_onecell_data allocation 2023-04-05 11:23:29 +02:00
iommu iommu/amd: Don't block updates to GATag if guest mode is on 2023-06-09 10:30:04 +02:00
ipack
irqchip irqchip/mips-gic: Use raw spinlock for gic_lock 2023-08-26 15:26:48 +02:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:21:01 +02:00
leds leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on dev rename 2023-07-27 08:44:14 +02:00
lightnvm
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-17 11:48:00 +02:00
mailbox mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0 2023-07-27 08:44:08 +02:00
mcb mcb-pci: Reallocate memory region to avoid memory overlapping 2023-05-30 12:57:50 +01:00
md dm integrity: reduce vmalloc space footprint on 32-bit architectures 2023-08-30 16:23:11 +02:00
media media: vcodec: Fix potential array out-of-bounds in encoder queue_setup 2023-08-30 16:23:16 +02:00
memory memory: brcmstb_dpfe: fix testing array offset after use 2023-07-27 08:43:48 +02:00
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-07-27 08:43:40 +02:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-30 12:57:49 +01:00
mfd mfd: stmpe: Only disable the regulators if they are enabled 2023-07-27 08:44:07 +02:00
misc misc: pci_endpoint_test: Re-init completion for every test 2023-07-27 08:44:29 +02:00
mmc mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove 2023-08-26 15:26:56 +02:00
most
mtd mtd: rawnand: fsl_upm: Fix an off-by one test in fun_exec_op() 2023-08-11 11:57:54 +02:00
mux
net ibmveth: Use dcbf rather than dcbfl 2023-08-30 16:23:14 +02:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 10:28:14 +02:00
ntb NTB: ntb_tool: Add check for devm_kcalloc 2023-07-27 08:44:22 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-27 08:43:31 +02:00
nvdimm
nvme nvme-rdma: fix potential unbalanced freeze & unfreeze 2023-08-16 18:21:02 +02:00
nvmem nvmem: core: fix return value 2023-02-22 12:56:00 +01:00
of of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock 2023-08-30 16:23:16 +02:00
opp OPP: fix error checking in opp_migrate_dentry() 2023-03-11 16:39:26 +01:00
oprofile
parisc parisc: led: Fix potential null-ptr-deref in start_task() 2023-01-14 10:16:36 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-25 17:45:44 +01:00
pci PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus 2023-08-30 16:23:16 +02:00
pcmcia pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db() 2023-08-26 15:26:45 +02:00
perf perf/arm-cmn: Fix DTC reset 2023-07-27 08:43:33 +02:00
phy phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe() 2023-08-11 11:57:35 +02:00
pinctrl pinctrl: renesas: rza2: Add lock around pinctrl_generic{{add,remove}_group,{add,remove}_function} 2023-08-30 16:23:19 +02:00
platform platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100 2023-08-11 11:57:36 +02:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2023-01-14 10:15:17 +01:00
power power: supply: Fix logic checking if system is running from battery 2023-06-21 15:45:36 +02:00
powercap powercap: RAPL: Fix CONFIG_IOSF_MBI dependency 2023-07-27 08:43:34 +02:00
pps
ps3
ptp ptp_qoriq: fix memory leak in probe() 2023-04-05 11:23:47 +02:00
pwm pwm: meson: fix handling of period/duty if greater than UINT_MAX 2023-08-11 11:57:33 +02:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2023-01-14 10:15:23 +01:00
ras
regulator regulator: core: Streamline debugfs operations 2023-07-27 08:43:38 +02:00
remoteproc remoteproc: stm32_rproc: Add mutex protection for workqueue 2023-05-30 12:57:48 +01:00
reset reset: imx7: Fix the iMX8MP PCIe PHY PERST support 2022-10-05 10:38:40 +02:00
rpmsg rpmsg: glink: Avoid infinite loop on intent for missing channel 2023-03-11 16:39:47 +01:00
rtc rtc: st-lpc: Release some resources in st_rtc_probe() in case of error 2023-07-27 08:44:07 +02:00
s390 scsi: zfcp: Defer fc_rport blocking until after ADISC response 2023-08-11 11:57:51 +02:00
sbus
scsi scsi: core: raid_class: Remove raid_component_add() 2023-08-30 16:23:18 +02:00
sfi
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-25 17:45:44 +01:00
slimbus slimbus: stream: correct presence rate frequencies 2022-11-25 17:45:50 +01:00
soc drivers: meson: secure-pwrc: always enable DMA domain 2023-07-27 08:43:55 +02:00
soundwire soundwire: fix enumeration completion 2023-08-11 11:57:55 +02:00
spi spi: bcm63xx: fix max prepend length 2023-07-27 08:44:38 +02:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-17 11:47:59 +02:00
ssb
staging staging: r8712: Fix memory leak in _r8712_init_xmit_priv() 2023-08-11 11:57:43 +02:00
target scsi: target: iscsi: Prevent login threads from racing between each other 2023-06-28 10:28:14 +02:00
tc
tee tee: amdtee: Add return_origin to 'struct tee_cmd_load_ta' 2023-06-14 11:09:53 +02:00
thermal thermal/drivers/sun8i: Fix some error handling paths in sun8i_ths_probe() 2023-07-27 08:43:34 +02:00
thunderbolt thunderbolt: Use const qualifier for ring_interrupt_index 2023-04-05 11:23:37 +02:00
tty serial: 8250: Fix oops for port->pm on uart_change_pm() 2023-08-26 15:26:55 +02:00
uio uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2023-01-14 10:15:55 +01:00
usb USB: dwc3: qcom: fix NULL-deref on suspend 2023-08-26 15:26:49 +02:00
vdpa vdpa/mlx5: Don't clear mr struct on destroy MR 2023-03-11 16:39:45 +01:00
vfio vfio/type1: prevent underflow of locked_vm via exec() 2023-03-11 16:40:07 +01:00
vhost vhost: support PACKED when setting-getting vring_base 2023-06-14 11:09:57 +02:00
video fbdev: fix potential OOB read in fast_imageblit() 2023-08-30 16:23:10 +02:00
virt vboxguest: Do not use devm for irq 2022-08-25 11:38:14 +02:00
virtio virtio-mmio: don't break lifecycle of vm_dev 2023-08-26 15:26:50 +02:00
visorbus
vlynq
vme vme: Fix error not catched in fake_init() 2023-01-14 10:16:00 +01:00
w1 w1: fix loop in w1_fini() 2023-07-27 08:44:02 +02:00
watchdog watchdog: menz069_wdt: fix watchdog initialisation 2023-06-09 10:30:07 +02:00
xen xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-30 12:57:58 +01:00
zorro
Kconfig
Makefile