* [PATCH v4] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe
@ 2026-01-13 14:34 Xingjing Deng
2026-01-16 14:47 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Xingjing Deng @ 2026-01-13 14:34 UTC (permalink / raw)
To: srini, amahesh, arnd, gregkh
Cc: dri-devel, linux-arm-msm, linux-kernel, Xingjing Deng, stable
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
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>
---
v4:
- Format the indentation
- Link to v3: https://lore.kernel.org/linux-arm-msm/20260113084352.72itrloj5w7qb5o3@hu-mojha-hyd.qualcomm.com/T/#t
v3:
- Add missing linux-kernel@vger.kernel.org to cc list.
- Standarlize changelog placement/format.
- Link to v2: https://lore.kernel.org/linux-arm-msm/20260113063618.e2ke47gy3hnfi67e@hu-mojha-hyd.qualcomm.com/T/#t
v2:
- Add Fixes: and Cc: stable tags.
- Link to v1: https://lore.kernel.org/linux-arm-msm/20260113022550.4029635-1-xjdeng@buaa.edu.cn/T/#u
Signed-off-by: Xingjing Deng <xjdeng@buaa.edu.cn>
---
drivers/misc/fastrpc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index cbb12db110b3..9c41b51d80ee 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2339,10 +2339,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
src_perms = BIT(QCOM_SCM_VMID_HLOS);
err = qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms,
- data->vmperms, data->vmcount);
+ data->vmperms, data->vmcount);
if (err) {
dev_err(rdev, "Failed to assign memory phys 0x%llx size 0x%llx err %d",
- res.start, resource_size(&res), err);
+ res.start, resource_size(&res), err);
goto err_free_data;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v4] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe
2026-01-13 14:34 [PATCH v4] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Xingjing Deng
@ 2026-01-16 14:47 ` Greg KH
2026-01-17 14:04 ` Xingjing Deng
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2026-01-16 14:47 UTC (permalink / raw)
To: Xingjing Deng
Cc: srini, amahesh, arnd, dri-devel, linux-arm-msm, linux-kernel,
Xingjing Deng, stable
On Tue, Jan 13, 2026 at 10:34:45PM +0800, Xingjing Deng wrote:
> 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
>
> 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>
>
> ---
>
> v4:
> - Format the indentation
> - Link to v3: https://lore.kernel.org/linux-arm-msm/20260113084352.72itrloj5w7qb5o3@hu-mojha-hyd.qualcomm.com/T/#t
>
> v3:
> - Add missing linux-kernel@vger.kernel.org to cc list.
> - Standarlize changelog placement/format.
> - Link to v2: https://lore.kernel.org/linux-arm-msm/20260113063618.e2ke47gy3hnfi67e@hu-mojha-hyd.qualcomm.com/T/#t
>
> v2:
> - Add Fixes: and Cc: stable tags.
> - Link to v1: https://lore.kernel.org/linux-arm-msm/20260113022550.4029635-1-xjdeng@buaa.edu.cn/T/#u
>
> Signed-off-by: Xingjing Deng <xjdeng@buaa.edu.cn>
> ---
> drivers/misc/fastrpc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index cbb12db110b3..9c41b51d80ee 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -2339,10 +2339,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
> src_perms = BIT(QCOM_SCM_VMID_HLOS);
>
> err = qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms,
> - data->vmperms, data->vmcount);
> + data->vmperms, data->vmcount);
I'm all for coding style cleanups, but don't mix that into a patch that
does something else. Also, please indent this properly, checkpatch
should complain about this.
> if (err) {
> dev_err(rdev, "Failed to assign memory phys 0x%llx size 0x%llx err %d",
> - res.start, resource_size(&res), err);
> + res.start, resource_size(&res), err);
Same here, that's not right.
And I don't see the real change here, are you sure you generated this
properly? This just looks like coding style cleanups, which do not
match the changelog text.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v4] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe
2026-01-16 14:47 ` Greg KH
@ 2026-01-17 14:04 ` Xingjing Deng
0 siblings, 0 replies; 3+ messages in thread
From: Xingjing Deng @ 2026-01-17 14:04 UTC (permalink / raw)
To: Greg KH
Cc: srini, amahesh, arnd, dri-devel, linux-arm-msm, linux-kernel,
Xingjing Deng, stable
OK, I have released v5.
Thanks for your help.
Greg KH <gregkh@linuxfoundation.org> 于2026年1月16日周五 22:47写道:
>
> On Tue, Jan 13, 2026 at 10:34:45PM +0800, Xingjing Deng wrote:
> > 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
> >
> > 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>
> >
> > ---
> >
> > v4:
> > - Format the indentation
> > - Link to v3: https://lore.kernel.org/linux-arm-msm/20260113084352.72itrloj5w7qb5o3@hu-mojha-hyd.qualcomm.com/T/#t
> >
> > v3:
> > - Add missing linux-kernel@vger.kernel.org to cc list.
> > - Standarlize changelog placement/format.
> > - Link to v2: https://lore.kernel.org/linux-arm-msm/20260113063618.e2ke47gy3hnfi67e@hu-mojha-hyd.qualcomm.com/T/#t
> >
> > v2:
> > - Add Fixes: and Cc: stable tags.
> > - Link to v1: https://lore.kernel.org/linux-arm-msm/20260113022550.4029635-1-xjdeng@buaa.edu.cn/T/#u
> >
> > Signed-off-by: Xingjing Deng <xjdeng@buaa.edu.cn>
> > ---
> > drivers/misc/fastrpc.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> > index cbb12db110b3..9c41b51d80ee 100644
> > --- a/drivers/misc/fastrpc.c
> > +++ b/drivers/misc/fastrpc.c
> > @@ -2339,10 +2339,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
> > src_perms = BIT(QCOM_SCM_VMID_HLOS);
> >
> > err = qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms,
> > - data->vmperms, data->vmcount);
> > + data->vmperms, data->vmcount);
>
> I'm all for coding style cleanups, but don't mix that into a patch that
> does something else. Also, please indent this properly, checkpatch
> should complain about this.
>
>
> > if (err) {
> > dev_err(rdev, "Failed to assign memory phys 0x%llx size 0x%llx err %d",
> > - res.start, resource_size(&res), err);
> > + res.start, resource_size(&res), err);
>
> Same here, that's not right.
>
> And I don't see the real change here, are you sure you generated this
> properly? This just looks like coding style cleanups, which do not
> match the changelog text.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-17 14:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 14:34 [PATCH v4] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Xingjing Deng
2026-01-16 14:47 ` Greg KH
2026-01-17 14:04 ` Xingjing Deng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox