diff options
| author | Yuho Choi <oss.patchbox@gmail.com> | 2026-11-05 12:32:24 -0500 |
|---|---|---|
| committer | Bjorn Andersson <andersson@kernel.org> | 2026-11-08 14:00:47 -0600 |
| commit | 3f4f7571c001b04622be50c288c73ec8f320beca (patch) | |
| tree | 0554e0464a3e4335805ce5ddf054ebaaea38f438 /scripts/Makefile.thinlto | |
| parent | dfcd5046c3b434107c72f21fc32d6226bf281f4a (diff) | |
| download | linux-next-3f4f7571c001b04622be50c288c73ec8f320beca.tar.gz linux-next-3f4f7571c001b04622be50c288c73ec8f320beca.zip | |
remoteproc: qcom_q6v5_mss: Leak metadata buffer if reclaim fails
When the device tree describes no "metadata" memory region,
q6v5_mpss_init_image() allocates the MPSS metadata buffer with
dma_alloc_attrs(), assigns it to the modem and asks the MBA to
authenticate it. It then calls q6v5_xfer_mem_ownership() again to
assign the buffer back to HLOS.
If that second call fails, the buffer is still assigned to the modem,
but the function only warns and then returns the buffer to the DMA
allocator. The pages can then be reused by another part of the kernel
while the modem can still access them.
Leak the buffer in that case instead. The driver has no later point at
which it could retry the reassignment. The MBA and MPSS regions and a
"metadata" region from the device tree are never freed, so this is the
only place where a buffer that failed to be reclaimed goes back to the
allocator.
Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch")
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
Link: https://lore.kernel.org/r/20261105173336.32359-2-oss.patchbox@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
