* FAILED: patch "[PATCH] misc: fastrpc: check qcom_scm_assign_mem() return in" failed to apply to 6.12-stable tree
@ 2026-04-08 7:01 gregkh
2026-04-08 14:21 ` [PATCH 6.12.y] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2026-04-08 7:01 UTC (permalink / raw)
To: micro6947, dmitry.baryshkov, gregkh, xjdeng; +Cc: stable
The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 6a502776f4a4f80fb839b22f12aeaf0267fca344
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026040853-keg-enchanted-fd3d@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 6a502776f4a4f80fb839b22f12aeaf0267fca344 Mon Sep 17 00:00:00 2001
From: Xingjing Deng <micro6947@gmail.com>
Date: Sat, 31 Jan 2026 14:55:39 +0800
Subject: [PATCH] misc: fastrpc: check qcom_scm_assign_mem() return in
rpmsg_probe
In the SDSP probe path, qcom_scm_assign_mem() is used to assign the
reserved memory to the configured VMIDs, but its return value was not checked.
Fail the probe if the SCM call fails to avoid continuing with an
unexpected/incorrect memory permission configuration.
This issue was found by an in-house analysis workflow that extracts AST-based
information and runs static checks, with LLM assistance for triage, and was
confirmed by manual code review.
No hardware testing was performed.
Fixes: c3c0363bc72d4 ("misc: fastrpc: support complete DMA pool access to the DSP")
Cc: stable@vger.kernel.org # 6.11-rc1
Signed-off-by: Xingjing Deng <xjdeng@buaa.edu.cn>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260131065539.2124047-1-xjdeng@buaa.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 19cfc487df7c..1080f9acf70a 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2390,8 +2390,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
if (!err) {
src_perms = BIT(QCOM_SCM_VMID_HLOS);
- qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms,
+ err = qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms,
data->vmperms, data->vmcount);
+ if (err)
+ goto err_free_data;
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 6.12.y] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe
2026-04-08 7:01 FAILED: patch "[PATCH] misc: fastrpc: check qcom_scm_assign_mem() return in" failed to apply to 6.12-stable tree gregkh
@ 2026-04-08 14:21 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-04-08 14:21 UTC (permalink / raw)
To: stable
Cc: Xingjing Deng, Xingjing Deng, Dmitry Baryshkov,
Greg Kroah-Hartman, Sasha Levin
From: Xingjing Deng <micro6947@gmail.com>
[ Upstream commit 6a502776f4a4f80fb839b22f12aeaf0267fca344 ]
In the SDSP probe path, qcom_scm_assign_mem() is used to assign the
reserved memory to the configured VMIDs, but its return value was not checked.
Fail the probe if the SCM call fails to avoid continuing with an
unexpected/incorrect memory permission configuration.
This issue was found by an in-house analysis workflow that extracts AST-based
information and runs static checks, with LLM assistance for triage, and was
confirmed by manual code review.
No hardware testing was performed.
Fixes: c3c0363bc72d4 ("misc: fastrpc: support complete DMA pool access to the DSP")
Cc: stable@vger.kernel.org # 6.11-rc1
Signed-off-by: Xingjing Deng <xjdeng@buaa.edu.cn>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260131065539.2124047-1-xjdeng@buaa.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ adapted qcom_scm_assign_mem() error check to use fdev_error label and rmem-based memory API ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/misc/fastrpc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index d6c55c338b062..d3d4d50fb0e54 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2345,8 +2345,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
src_perms = BIT(QCOM_SCM_VMID_HLOS);
- qcom_scm_assign_mem(rmem->base, rmem->size, &src_perms,
+ err = qcom_scm_assign_mem(rmem->base, rmem->size, &src_perms,
data->vmperms, data->vmcount);
+ if (err)
+ goto fdev_error;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-08 14:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 7:01 FAILED: patch "[PATCH] misc: fastrpc: check qcom_scm_assign_mem() return in" failed to apply to 6.12-stable tree gregkh
2026-04-08 14:21 ` [PATCH 6.12.y] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox