FAILED: patch "[PATCH] misc: fastrpc: check qcom_scm_assign_mem() return in" failed to apply to 6.12-stable tree
Subsystems (3)
[email protected]
maintainerThe 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 <[email protected]>.
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 '<[email protected]>' --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 <[email protected]>
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.
drivers/misc/fastrpc.c +3 -1
@@ -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; } }
Sasha Levin
maintainerPATCH 1/1 misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe
From: Xingjing Deng <[email protected]>
[ 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.
--- drivers/misc/fastrpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/misc/fastrpc.c +3 -1
@@ -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; }
Signature · 1 line
2.53.0