linux-stable/drivers/misc
Richard Acayan 46248400d8 misc: fastrpc: reject new invocations during device removal
The channel's rpmsg object allows new invocations to be made. After old
invocations are already interrupted, the driver shouldn't try to invoke
anymore. Invalidating the rpmsg at the end of the driver removal
function makes it easy to cause a race condition in userspace. Even
closing a file descriptor before the driver finishes its cleanup can
cause an invocation via fastrpc_release_current_dsp_process() and
subsequent timeout.

Invalidate the channel before the invocations are interrupted to make
sure that no invocations can be created to hang after the device closes.

Fixes: c68cfb718c ("misc: fastrpc: Add support for context Invoke method")
Cc: stable <stable@kernel.org>
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230523152550.438363-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-29 15:09:50 +01:00
..
altera-stapl
bcm-vk
c2port driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
cardreader misc: alcor_pci: remove unused alcor functions 2023-03-29 12:20:32 +02:00
cb710
cxl driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
echo
eeprom eeprom: idt_89hpesx: Fix error handling in idt_init() 2023-01-20 12:05:26 +01:00
genwqe - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
ibmasm
lis3lv02d misc: lis3lv02d: Fix reading 'st,default-rate' property 2023-03-17 15:23:32 +01:00
lkdtm lkdtm/stackleak: Fix noinstr violation 2023-04-14 16:08:26 +02:00
mchp_pci1xxxx misc: microchip: pci1xxxx: Convert to immutable irqchip 2023-03-09 18:07:29 +01:00
mei Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
ocxl driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
pvpanic
sgi-gru Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
sgi-xp sgi-xp: simplify sysctl registration 2023-03-09 17:32:13 +01:00
ti-st drivers: misc: ti-st: Fix a typo ("unknow") 2023-01-31 13:02:46 +01:00
uacce driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
vmw_vmci Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
ad525x_dpot-i2c.c misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() 2023-03-09 21:58:45 +01:00
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c misc: apds990x: Convert to i2c's .probe_new() 2022-11-23 19:56:39 +01:00
apds9802als.c misc: apds9802als: Convert to i2c's .probe_new() 2022-11-23 19:56:39 +01:00
atmel-ssc.c
bh1770glc.c misc: bh1770glc: Convert to i2c's .probe_new() 2022-11-23 19:56:39 +01:00
cs5535-mfgpt.c
ds1682.c misc: ds1682: Convert to i2c's .probe_new() 2022-11-23 19:56:39 +01:00
dummy-irq.c
dw-xdata-pcie.c
enclosure.c drivers: remove struct module * setting from struct class 2023-03-17 15:16:27 +01:00
fastrpc.c misc: fastrpc: reject new invocations during device removal 2023-05-29 15:09:50 +01:00
gehc-achc.c
hi6421v600-irq.c
hisi_hikey_usb.c
hmc6352.c misc: hmc6352: Convert to i2c's .probe_new() 2022-11-23 19:56:38 +01:00
hpilo.c Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c misc: ics932s401: Convert to i2c's .probe_new() 2022-11-23 19:56:39 +01:00
isl29003.c misc: isl29003: Use sysfs_emit() to instead of sprintf() 2023-01-31 13:02:46 +01:00
isl29020.c misc: isl29020: Convert to i2c's .probe_new() 2022-11-23 19:56:07 +01:00
Kconfig Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
kgdbts.c
lattice-ecp3-config.c
Makefile Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
open-dice.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
pch_phub.c
pci_endpoint_test.c Merge branch 'pci/misc' 2023-02-22 13:47:32 -06:00
phantom.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
qcom-coincell.c
smpro-errmon.c misc: smpro-errmon: Add dimm training failure syndrome 2023-03-10 09:47:16 +01:00
smpro-misc.c misc: smpro-misc: Add Ampere's Altra SMpro misc driver 2022-11-10 19:03:03 +01:00
sram-exec.c mm: Introduce set_memory_rox() 2022-12-15 10:37:26 -08:00
sram.c misc/sram: Use of_property_read_bool() for boolean properties 2023-03-17 15:23:25 +01:00
sram.h misc: sram: Improve and simplify clk handling 2023-03-09 17:31:53 +01:00
tifm_7xx1.c misc: tifm: fix possible memory leak in tifm_7xx1_switch_media() 2022-11-23 19:55:26 +01:00
tifm_core.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
tsl2550.c misc: tsl2550: Convert to i2c's .probe_new() 2022-11-23 19:56:05 +01:00
vcpu_stall_detector.c
vmw_balloon.c misc: vmw_balloon: fix memory leak with using debugfs_lookup() 2023-02-08 13:24:22 +01:00
xilinx_sdfec.c
xilinx_tmr_inject.c drivers: misc: Add Support for TMR Inject IP 2023-01-20 13:10:15 +01:00
xilinx_tmr_manager.c drivers: misc: Add Support for TMR Manager 2023-01-20 13:09:30 +01:00