linux/drivers/misc
Shawn Guo 5533bb4bc5 misc: fastrpc: Drop unhandled DSP PD exit notification
Newer DSP firmware implements a PD (Protection Domain) notification
framework that sends PD state notifications upon request. The PD exit
notification is unconditionally sent by the DSP with a fixed sentinel
0xABCDABCD in the context field.

fastrpc_rpmsg_callback() treats every inbound message as an invoke
response, so the sentinel is masked and shifted like any real response
((0xABCDABCD & 0xFF0) >> 4 == 188) and looked up in the channel's
context idr.

This is not merely cosmetic. In the common case idr slot 188 is empty,
the lookup fails, and the driver only logs a spurious "No context ID
matches response" error on every teardown. But the context idr is shared
by every protection domain and the listener thread on the channel and is
filled cyclically over [1, FASTRPC_CTX_MAX]. If slot 188 holds a live
context when the sentinel arrives, the sentinel's return value is written
into that unrelated in-flight invocation and it is completed early.

Since neither the fastrpc library nor the driver supports the DSP PD
notification framework, it is safe to drop the PD exit notification
before it is ever turned into a context lookup. This removes both the
log spam and the mis-completion race. A genuine response can never be
masked: a real context is (idr_index << 4) | pd (at most 0xFF3) and
can never equal the sentinel.

Assisted-by: Claude:claude-opus-4-8
Reviewed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20260729094352.111065-11-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-31 14:15:53 +02:00
..
altera-stapl Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
amd-sbi misc: amd-sbi: Add SBTSI ioctl register transfer interface 2026-07-17 15:50:48 +02:00
bcm-vk misc: bcm-vk: validate write size before allocation 2026-07-17 15:49:56 +02:00
c2port Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cardreader misc: rtsx: add missing write register handling 2026-07-17 15:49:57 +02:00
cb710 misc: cb710: Fix a NULL vs IS_ERR() check in probe() 2025-11-26 15:09:34 +01:00
eeprom Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
genwqe misc: genwqe: handle a first DMA address of zero 2026-07-17 15:50:25 +02:00
ibmasm misc: ibmasm: add parentheses around sizeof operand 2026-07-17 15:49:48 +02:00
issei issei: add heci hardware module 2026-07-17 15:48:11 +02:00
keba misc: keba: cp500: use pcim_enable_device() 2026-07-17 15:50:34 +02:00
lis3lv02d lis3lv02d: Omit IRQF_ONESHOT if no threaded handler is provided 2026-04-01 10:19:43 +02:00
lkdtm string: Remove strncpy() from the kernel 2026-06-18 16:39:31 -07:00
mchp_pci1xxxx Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
mei Merge 7.2-rc5 into char-misc-next 2026-07-27 14:17:19 +02:00
ocxl Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pvpanic Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
rp1 misc: rp1: Switch to irq_domain_create_linear() 2026-07-17 15:51:10 +02:00
sgi-gru misc: sgi-gru: fill execution status in exception details 2026-07-17 15:50:28 +02:00
sgi-xp Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
uacce Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vmw_vmci drivers: misc: vmw_vmci: fix typo in comment 2026-05-23 13:47:33 +02:00
ad525x_dpot-i2c.c misc: ad525x_dpot: use driver core groups for sysfs files 2026-07-17 15:50:10 +02:00
ad525x_dpot-spi.c misc: ad525x_dpot: use driver core groups for sysfs files 2026-07-17 15:50:10 +02:00
ad525x_dpot.c misc: ad525x_dpot: use driver core groups for sysfs files 2026-07-17 15:50:10 +02:00
ad525x_dpot.h misc: ad525x_dpot: use driver core groups for sysfs files 2026-07-17 15:50:10 +02:00
apds9802als.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
atmel-ssc.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
bh1770glc.c misc: bh1770glc: use pm_runtime_resume_and_get() in power_state_store 2025-11-26 15:09:37 +01:00
cs5535-mfgpt.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ds1682.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
dummy-irq.c
dw-xdata-pcie.c dw-xdata: Use str_write_read() in dw_xdata_start() and dw_xdata_perf() 2025-09-06 15:59:39 +02:00
enclosure.c drivers/misc/enclosure: Replace strcpy() + strcat() with snprintf() 2026-07-17 15:49:07 +02:00
fastrpc.c misc: fastrpc: Drop unhandled DSP PD exit notification 2026-07-31 14:15:53 +02:00
gehc-achc.c
hi6421v600-irq.c misc: Remove redundant dev_err()/dev_err_probe() 2026-07-17 14:56:17 +02:00
hisi_hikey_usb.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
hmc6352.c misc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-03 16:41:00 +02:00
hpilo.c misc: hpilo: validate device queue entries before use 2026-07-17 15:49:59 +02:00
hpilo.h
ibmvmc.c misc: ibmvmc: reject oversized inbound messages 2026-07-17 15:50:03 +02:00
ibmvmc.h
ics932s401.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
isl29003.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
isl29020.c misc: isl29020: Fix the wrong format specifier 2024-11-12 12:54:53 +01:00
Kconfig issei: initial driver skeleton 2026-07-17 15:48:11 +02:00
kgdbts.c Char/Misc/IIO driver changes for 7.0-rc1 2026-02-17 09:11:04 -08:00
lan966x_pci.c misc: lan966x_pci: depopulate children on populate failure 2026-07-17 15:50:12 +02:00
lan966x_pci.dtso misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent' 2024-11-04 14:34:25 +01:00
lattice-ecp3-config.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
Makefile issei: initial driver skeleton 2026-07-17 15:48:11 +02:00
mrvl_cn10k_dpi.c misc: Remove redundant dev_err()/dev_err_probe() 2026-07-17 14:56:17 +02:00
nsm.c Merge 7.2-rc5 into char-misc-next 2026-07-27 14:17:19 +02:00
ntsync.c ntsync: Honour caller's time namespace for absolute MONOTONIC timeouts 2026-06-02 21:05:36 +02:00
open-dice.c misc: open-dice: add ACPI device discovery support 2026-07-17 15:51:03 +02:00
pch_phub.c misc: pch_phub: Make MAC address configuration more robust 2026-07-17 15:49:01 +02:00
pci_endpoint_test.c misc: pci_endpoint_test: Remove dead BAR read before doorbell trigger 2026-06-22 15:23:12 -05:00
phantom.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qcom-coincell.c
rpmb-core.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
smpro-errmon.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
smpro-misc.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sram-exec.c
sram.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sram.h
ti_fpc202.c misc: ti_fpc202: Support special-purpose GPIO lines with LED features 2026-04-02 16:29:27 +02:00
tifm_7xx1.c misc: tifm: Use PCI_VDEVICE to initialize pci_device_id array 2026-05-23 13:47:33 +02:00
tifm_core.c memstick: Constify the driver id_table 2026-05-11 16:59:43 +02:00
tps6594-esm.c misc: Remove redundant dev_err()/dev_err_probe() 2026-07-17 14:56:17 +02:00
tps6594-pfsm.c misc: Remove redundant dev_err()/dev_err_probe() 2026-07-17 14:56:17 +02:00
tsl2550.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vcpu_stall_detector.c misc: vcpu_stall_detector: Switch to use hrtimer_setup() 2025-02-18 11:19:04 +01:00
vmw_balloon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xilinx_sdfec.c misc: xilinx_sdfec: validate LDPC code register offsets 2026-07-17 15:50:22 +02:00
xilinx_tmr_inject.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
xilinx_tmr_manager.c