Skip to content

Add missing bug fixes#433

Open
Jianping-Li wants to merge 4 commits intoqualcomm-linux:qcom-6.18.yfrom
Jianping-Li:remote_heap
Open

Add missing bug fixes#433
Jianping-Li wants to merge 4 commits intoqualcomm-linux:qcom-6.18.yfrom
Jianping-Li:remote_heap

Conversation

@Jianping-Li
Copy link
Copy Markdown

This patch series adds the listed bug fixes that have been missing in QLI2.0 fastRPC driver.
following fixes:

  • Add multiple fixes for remote heap which is used by Audio PD.
  • Add safety checks to fastrpc_buf_free

Link: https://lore.kernel.org/all/20260407100508.1027-1-jianping.li@oss.qualcomm.com/

CRs-Fixed: 4483711

ekanshibu and others added 4 commits April 7, 2026 18:33
…emory pool

The initial buffer allocated for the Audio PD memory pool is never added
to the pool because pageslen is set to 0. As a result, the buffer is not
registered with Audio PD and is never used, causing a memory leak. Audio
PD immediately falls back to allocating memory from the remote heap since
the pool starts out empty.

Fix this by setting pageslen to 1 so that the initially allocated buffer
is correctly registered and becomes part of the Audio PD memory pool.

Link: https://lore.kernel.org/all/20260407100508.1027-2-jianping.li@oss.qualcomm.com/
Fixes: 0871561 ("misc: fastrpc: Add support for audiopd")
Cc: stable@kernel.org
Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com>
…tion

fastrpc_req_munmap_impl() is called to unmap any buffer. The buffer is
getting removed from the list after it is unmapped from DSP. This can
create potential race conditions if any other thread removes the entry
from list while unmap operation is ongoing. Remove the entry before
calling unmap operation.

Link: https://lore.kernel.org/all/20260407100508.1027-3-jianping.li@oss.qualcomm.com/
Fixes: 2419e55 ("misc: fastrpc: add mmap/unmap support")
Cc: stable@kernel.org
Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com>
… in probe

Allocating and freeing Audio PD memory from userspace is unsafe because
the kernel cannot reliably determine when the DSP has finished using the
memory. Userspace may free buffers while they are still in use by the DSP,
and remote free requests cannot be safely trusted.

Allocate the entire Audio PD reserved-memory region upfront during rpmsg
probe and tie its lifetime to the rpmsg channel. This avoids userspace-
controlled alloc/free and ensures memory is reclaimed only when the DSP
shuts down.

Link: https://lore.kernel.org/all/20260407100508.1027-4-jianping.li@oss.qualcomm.com/
Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com>
Make fastrpc_buf_free() a no-op when passed a NULL pointer, allowing
callers to avoid open-coded NULL checks.

Link: https://lore.kernel.org/all/20260407100508.1027-5-jianping.li@oss.qualcomm.com/
Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com>
@Jianping-Li Jianping-Li requested a review from a team April 7, 2026 10:40
@shashim-quic
Copy link
Copy Markdown

qcom-6.18.y-checkFailing after 1s — Change Requests Validation Check

this is failing because mainline component in the CR has not been associated with valid mainline changes.

@sgaud-quic
Copy link
Copy Markdown
Contributor

qcom-6.18.y-checkFailing after 1s — Change Requests Validation Check

this is failing because mainline component in the CR has not been associated with valid mainline changes.

@Jianping-Li please update CR with mainline changes

@qcomlnxci
Copy link
Copy Markdown

Test Matrix

Test Case lemans-evk monaco-evk qcs615-ride qcs6490-rb3gen2 qcs8300-ride qcs9100-ride-r3 sm8750-mtp x1e80100-crd
0_qcom-next-ci-premerge-tests ◻️ ◻️ ◻️ ◻️ ◻️ ◻️ ❌ Fail ◻️
BT_FW_KMD_Service ❌ Fail ❌ Fail ❌ Fail ◻️ ✅ Pass ✅ Pass ❌ Fail ◻️
BT_ON_OFF ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ⚠️ skip ◻️
BT_SCAN ✅ Pass ❌ Fail ✅ Pass ◻️ ✅ Pass ✅ Pass ◻️ ◻️
CPUFreq_Validation ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
CPU_affinity ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
DSP_AudioPD ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ◻️ ◻️
Ethernet ✅ Pass ✅ Pass ⚠️ skip ◻️ ⚠️ skip ⚠️ skip ⚠️ skip ◻️
Freq_Scaling ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ❌ Fail ◻️
GIC ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
IPA ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
Interrupts ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
OpenCV ⚠️ skip ⚠️ skip ⚠️ skip ◻️ ⚠️ skip ⚠️ skip ◻️ ◻️
PCIe ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
Probe_Failure_Check ❌ Fail ❌ Fail ✅ Pass ◻️ ❌ Fail ❌ Fail ❌ Fail ◻️
RMNET ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
UFS_Validation ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
USBHost ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ❌ Fail ◻️
WiFi_Firmware_Driver ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ◻️ ◻️
WiFi_OnOff ✅ Pass ⚠️ skip ✅ Pass ◻️ ✅ Pass ✅ Pass ◻️ ◻️
cdsp_remoteproc ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ❌ Fail ◻️
hotplug ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
irq ❌ Fail ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
kaslr ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
pinctrl ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
qcom_hwrng ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ◻️ ◻️
remoteproc ✅ Pass ❌ Fail ✅ Pass ◻️ ❌ Fail ✅ Pass ❌ Fail ◻️
rngtest ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
shmbridge ✅ Pass ✅ Pass ❌ Fail ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
smmu ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️
watchdog ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ◻️ ◻️
wpss_remoteproc ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants