android_kernel_samsung_sm8650/drivers
Satya Durga Srinivasu Prabhala e2839b887e ANDROID: remoteproc: sysfs: fix race while updating recovery flag
We have debug features [1] to allow recovery of subsystem or crash
entire system to collect dumps for further analysis based on
recovery flag and when multiple clients (user space or kernel via
android_vh_rproc_recovery_set() vendor hook) try to update
the recovery flag, it is possible that, race condition would
lead to undesired results as updates to recovery flag isn't
protected by any mechanism today. To avoid such issues, take
remoteproc mutex lock before updating recovery flag and release
the lock once done.

Here is the scenario:
====================
1. We have downstream API which can be used by Kernel clients to
update the recovery_disabled flag.

2. Kernel client calls API to set recovery_disabled to false to
recover the subsystem instead of taking down entire system.

3. At around same time user space (via sysfs) tries to set the
recovery_disabled to true to take down entire system.

CPUX                                    CPUY
(update via sysfs)                      (update via Kernel client)
recovery_store()
    |                                   save_restore_recovery()
recovery_disabled = true;                        |
    |                                   recovery_disabled = false;
android_vh_rproc_recovery_set();

At this point, vendor_cb() running on CPUX invoked by vendor hook
which has save/restore functionality for recovery_disabled will
see undesired results.

[1]
https://lore.kernel.org/lkml/20221228162040.m3ucsyau3s55rkfn@builder.lan/T/
https://lore.kernel.org/lkml/20230201054609.14575-1-quic_satyap@quicinc.com/T/

Bug: 266790242
Change-Id: If880122be7f637b4215629117595f6ed7e833cd4
Signed-off-by: Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>
2023-02-11 01:13:39 +00:00
..
accessibility tty: fix possible null-ptr-defer in spk_ttyio_release 2023-01-24 07:24:37 +01:00
acpi use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
amba
android ANDROID: gic: Add affinity-setting vendor hooks to gic-v3 2023-02-01 20:23:30 +00:00
ata ata: libata: Fix sata_down_spd_limit() when no link speed is reported 2023-02-09 11:28:10 +01:00
atm
auxdisplay
base This is the 6.1.9 stable release 2023-02-01 09:12:59 +00:00
bcma
block block: ublk: extending queue_size to fix overflow 2023-02-09 11:28:08 +01:00
bluetooth Bluetooth: hci_qca: Fix driver shutdown on closed serdev 2023-01-24 07:24:32 +01:00
bus bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() 2023-02-09 11:27:59 +01:00
cdrom
char use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
clk This is the 6.1.2 stable release 2023-01-18 18:44:34 +00:00
clocksource This is the 6.1.2 stable release 2023-01-18 18:44:34 +00:00
comedi comedi: adv_pci1760: Fix PWM instruction handling 2023-01-24 07:24:35 +01:00
connector
counter counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update 2022-12-31 13:32:41 +01:00
cpufreq This is the 6.1.9 stable release 2023-02-01 09:12:59 +00:00
cpuidle ANDROID: cpuidle-psci: Fix suspicious RCU usage 2023-02-09 18:26:26 +00:00
crypto virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 2023-01-12 12:02:08 +01:00
cxl cxl/region: Fix missing probe failure 2023-01-07 11:11:39 +01:00
dax
dca
devfreq PM/devfreq: governor: Add a private governor_data for governor 2023-01-07 11:11:40 +01:00
dio drivers: dio: fix possible memory leak in dio_init() 2022-12-31 13:32:38 +01:00
dma dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init 2023-02-06 08:06:33 +01:00
dma-buf This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
edac EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info 2023-02-01 08:34:40 +01:00
eisa
extcon extcon: usbc-tusb320: Update state on probe even if no IRQ pending 2022-12-31 13:32:39 +01:00
firewire firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region 2023-02-09 11:27:59 +01:00
firmware This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
fpga fpga: stratix10-soc: Fix return value check in s10_ops_write_init() 2023-02-09 11:28:22 +01:00
fsi use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
gnss
gpio gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode 2023-02-06 08:06:34 +01:00
gpu This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
greybus
hid HID: playstation: sanity check DualSense calibration data. 2023-02-06 08:06:33 +01:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2022-12-31 13:32:45 +01:00
hte
hv This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
hwmon hwmon: (jc42) Fix missing unlock on error in jc42_write() 2022-12-31 13:33:06 +01:00
hwspinlock
hwtracing coresight: cti: Fix null pointer error on CTI init before ETM 2022-12-31 13:32:41 +01:00
i2c i2c: rk3x: fix a bunch of kernel-doc warnings 2023-02-09 11:28:13 +01:00
i3c
idle
iio iio:adc:twl6030: Enable measurement of VAC 2023-02-09 11:28:26 +01:00
infiniband use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
input Input: i8042 - add Clevo PCX0DX to i8042 quirk table 2023-02-01 08:34:50 +01:00
interconnect interconnect: qcom: msm8996: Fix regmap max_register values 2023-02-01 08:34:06 +01:00
iommu ANDROID: iommu: Define vendor hook to limit max alignment 2023-01-20 18:48:47 +00:00
ipack
irqchip ANDROID: gic: Add affinity-setting vendor hooks to gic-v3 2023-02-01 20:23:30 +00:00
isdn use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
leds leds: is31fl319x: Fix setting current limit for is31fl319{0,1,3} 2022-12-31 13:32:45 +01:00
macintosh macintosh/macio-adb: check the return value of ioremap() 2022-12-31 13:32:50 +01:00
mailbox mailbox: zynq-ipi: fix error handling while device_register() fails 2022-12-31 13:32:55 +01:00
mcb mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2022-12-31 13:32:41 +01:00
md This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
media This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
memory memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe() 2023-02-01 08:34:02 +01:00
memstick memstick/ms_block: Add check for alloc_ordered_workqueue 2022-12-31 13:32:25 +01:00
message
mfd mfd: mt6360: Add bounds checking in Regmap read/write call-backs 2023-01-04 11:29:01 +01:00
misc This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
mmc Merge 6.1.8 into android14-6.1 2023-01-26 12:13:04 +00:00
most
mtd mtd: cfi: allow building spi-intel standalone 2023-01-18 11:58:24 +01:00
mux
net wifi: brcmfmac: Check the count value of channel spec to prevent out-of-bounds reads 2023-02-09 11:28:27 +01:00
nfc nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame() 2023-01-18 11:58:26 +01:00
ntb
nubus
nvdimm
nvme use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
nvmem nvmem: core: fix return value 2023-02-09 11:28:25 +01:00
of This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
opp
parisc parisc: led: Fix potential null-ptr-deref in start_task() 2023-01-07 11:11:55 +01:00
parport
pci This is the 6.1.4 stable release 2023-01-18 18:49:08 +00:00
pcmcia
peci
perf Partially revert "perf/arm-cmn: Optimise DTC counter accesses" 2023-02-01 08:34:49 +01:00
phy phy: qcom-qmp-combo: fix runtime suspend 2023-02-09 11:28:25 +01:00
pinctrl pinctrl: rockchip: fix mux route data for rk3568 2023-02-01 08:34:20 +01:00
platform platform/x86/amd: pmc: add CONFIG_SERIO dependency 2023-02-09 11:28:26 +01:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2022-12-31 13:31:56 +01:00
power This is the 6.1.2 stable release 2023-01-18 18:44:34 +00:00
powercap
pps
ps3
ptp
pwm pwm: tegra: Fix 32 bit build 2022-12-31 13:33:12 +01:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2022-12-31 13:32:00 +01:00
ras
regulator regulator: da9211: Use irq handler when ready 2023-01-18 11:58:22 +01:00
remoteproc ANDROID: remoteproc: sysfs: fix race while updating recovery flag 2023-02-11 01:13:39 +00:00
reset reset: uniphier-glue: Fix possible null-ptr-deref 2023-02-01 08:34:05 +01:00
rpmsg
rtc rtc: efi: Enable SET/GET WAKEUP services as optional 2023-02-09 11:28:17 +01:00
s390 use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
sbus
scsi scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress 2023-02-09 11:28:12 +01:00
sh
siox
slimbus
soc PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() 2023-02-01 08:34:08 +01:00
soundwire soundwire: dmi-quirks: add quirk variant for LAPBC710 NUC15 2023-01-04 11:28:56 +01:00
spi spi: spidev: remove debug messages that access spidev->spi without locking 2023-02-01 08:34:32 +01:00
spmi
ssb
staging Merge 6.1.8 into android14-6.1 2023-01-26 12:13:04 +00:00
target scsi: target: core: Fix warning on RT kernels 2023-02-09 11:28:12 +01:00
tc
tee
thermal This is the 6.1.9 stable release 2023-02-01 09:12:59 +00:00
thunderbolt thunderbolt: Do not call PM runtime functions in tb_retimer_scan() 2023-01-24 07:24:37 +01:00
tty This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
ufs This is the 6.1.9 stable release 2023-02-01 09:12:59 +00:00
uio uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2022-12-31 13:32:38 +01:00
usb This is the 6.1.11 stable release 2023-02-09 13:29:55 +00:00
vdpa vdpa_sim_net: should not drop the multicast/broadcast packet 2023-01-24 07:24:31 +01:00
vfio vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp() 2023-02-01 08:34:36 +01:00
vhost vhost-scsi: unbreak any layout for response 2023-02-09 11:28:04 +01:00
video fbdev: smscufx: fix error handling code in ufx_usb_probe 2023-02-09 11:28:27 +01:00
virt virt/sev-guest: Add a MODULE_ALIAS 2022-12-31 13:32:09 +01:00
virtio Merge 6.1.8 into android14-6.1 2023-01-26 12:13:04 +00:00
vlynq
w1 w1: fix WARNING after calling w1_process() 2023-02-01 08:34:26 +01:00
watchdog watchdog: diag288_wdt: fix __diag288() inline assembly 2023-02-09 11:28:16 +01:00
xen use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
zorro
Kconfig
Makefile
OWNERS