* [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure
@ 2026-06-25 9:36 Mukesh Ojha
2026-06-25 10:06 ` Bartosz Golaszewski
2026-08-15 17:36 ` kernel test robot
0 siblings, 2 replies; 5+ messages in thread
From: Mukesh Ojha @ 2026-06-25 9:36 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Bartosz Golaszewski,
Elliot Berman, Andrew Halaney
Cc: linux-arm-msm, linux-kernel, Mukesh Ojha
qcom_scm_probe() acquires two non-devres resources that are never
released if probe fails or defers after them. of_reserved_mem_device_init()
adds an entry to a global list with no devres counterpart, so a retry
would add a duplicate entry and leak the original. qcom_tzmem_enable()
sets a static qcom_tzmem_dev pointer and may set qcom_tzmem_using_shm_bridge;
without cleanup a probe retry finds qcom_tzmem_dev already set and
returns -EBUSY, permanently preventing the driver from probing.
Introduce err_tzmem and err_rmem goto labels at the end of probe to
call qcom_tzmem_disable() and of_reserved_mem_device_release() in the
right order, route all subsequent error paths through them, and add
qcom_tzmem_disable() to qcom_tzmem.c to clear the static state.
Fixes: a33b2579c8d3 ("firmware: qcom: scm: add support for SHM bridge memory carveout")
Fixes: 40289e35ca52 ("firmware: qcom: scm: enable the TZ mem allocator")
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
---
This is reported on sasiko review as existing issue here
https://lore.kernel.org/all/20260624192213.C82691F000E9@smtp.kernel.org/
and it can go independently.
drivers/firmware/qcom/qcom_scm.c | 42 +++++++++++++++++++++---------
drivers/firmware/qcom/qcom_tzmem.c | 7 +++++
drivers/firmware/qcom/qcom_tzmem.h | 1 +
3 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index ba5cdeed8a04..cb3d776fa645 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -2883,9 +2883,11 @@ static int qcom_scm_probe(struct platform_device *pdev)
"Failed to setup the reserved memory region for TZ mem\n");
ret = qcom_tzmem_enable(scm->dev);
- if (ret)
- return dev_err_probe(scm->dev, ret,
- "Failed to enable the TrustZone memory allocator\n");
+ if (ret) {
+ ret = dev_err_probe(scm->dev, ret,
+ "Failed to enable the TrustZone memory allocator\n");
+ goto err_rmem;
+ }
memset(&pool_config, 0, sizeof(pool_config));
pool_config.initial_size = 0;
@@ -2893,16 +2895,20 @@ static int qcom_scm_probe(struct platform_device *pdev)
pool_config.max_size = SZ_256K;
scm->mempool = devm_qcom_tzmem_pool_new(scm->dev, &pool_config);
- if (IS_ERR(scm->mempool))
- return dev_err_probe(scm->dev, PTR_ERR(scm->mempool),
- "Failed to create the SCM memory pool\n");
+ if (IS_ERR(scm->mempool)) {
+ ret = dev_err_probe(scm->dev, PTR_ERR(scm->mempool),
+ "Failed to create the SCM memory pool\n");
+ goto err_tzmem;
+ }
ret = qcom_scm_query_waitq_count(scm);
scm->wq_cnt = ret < 0 ? QCOM_SCM_DEFAULT_WAITQ_COUNT : ret;
scm->waitq_comps = devm_kcalloc(&pdev->dev, scm->wq_cnt, sizeof(*scm->waitq_comps),
GFP_KERNEL);
- if (!scm->waitq_comps)
- return -ENOMEM;
+ if (!scm->waitq_comps) {
+ ret = -ENOMEM;
+ goto err_tzmem;
+ }
for (i = 0; i < scm->wq_cnt; i++)
init_completion(&scm->waitq_comps[i]);
@@ -2912,14 +2918,18 @@ static int qcom_scm_probe(struct platform_device *pdev)
irq = platform_get_irq_optional(pdev, 0);
if (irq < 0) {
- if (irq != -ENXIO)
- return irq;
+ if (irq != -ENXIO) {
+ ret = irq;
+ goto err_tzmem;
+ }
} else {
ret = devm_request_threaded_irq(scm->dev, irq, NULL, qcom_scm_irq_handler,
IRQF_ONESHOT, "qcom-scm", scm);
- if (ret < 0)
- return dev_err_probe(scm->dev, ret,
- "Failed to request qcom-scm irq\n");
+ if (ret < 0) {
+ ret = dev_err_probe(scm->dev, ret,
+ "Failed to request qcom-scm irq\n");
+ goto err_tzmem;
+ }
}
/*
@@ -2966,6 +2976,12 @@ static int qcom_scm_probe(struct platform_device *pdev)
qcom_scm_gunyah_wdt_init(scm);
return 0;
+
+err_tzmem:
+ qcom_tzmem_disable(scm->dev);
+err_rmem:
+ of_reserved_mem_device_release(scm->dev);
+ return ret;
}
static void qcom_scm_shutdown(struct platform_device *pdev)
diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
index 0635cbeacfc8..3f2b782f4a94 100644
--- a/drivers/firmware/qcom/qcom_tzmem.c
+++ b/drivers/firmware/qcom/qcom_tzmem.c
@@ -518,6 +518,13 @@ int qcom_tzmem_enable(struct device *dev)
}
EXPORT_SYMBOL_GPL(qcom_tzmem_enable);
+void qcom_tzmem_disable(struct device *dev)
+{
+ qcom_tzmem_using_shm_bridge = false;
+ qcom_tzmem_dev = NULL;
+}
+EXPORT_SYMBOL_GPL(qcom_tzmem_disable);
+
MODULE_DESCRIPTION("TrustZone memory allocator for Qualcomm firmware drivers");
MODULE_AUTHOR("Bartosz Golaszewski <bartosz.golaszewski@linaro.org>");
MODULE_LICENSE("GPL");
diff --git a/drivers/firmware/qcom/qcom_tzmem.h b/drivers/firmware/qcom/qcom_tzmem.h
index 8fa8a3eb940e..0b0f26d4e22e 100644
--- a/drivers/firmware/qcom/qcom_tzmem.h
+++ b/drivers/firmware/qcom/qcom_tzmem.h
@@ -9,5 +9,6 @@
struct device;
int qcom_tzmem_enable(struct device *dev);
+void qcom_tzmem_disable(struct device *dev);
#endif /* __QCOM_TZMEM_PRIV_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure
2026-06-25 9:36 [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure Mukesh Ojha
@ 2026-06-25 10:06 ` Bartosz Golaszewski
2026-06-25 11:27 ` Mukesh Ojha
2026-08-15 17:36 ` kernel test robot
1 sibling, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-06-25 10:06 UTC (permalink / raw)
To: Mukesh Ojha
Cc: linux-arm-msm, linux-kernel, Bjorn Andersson, Konrad Dybcio,
Bartosz Golaszewski, Elliot Berman, Andrew Halaney
On Thu, 25 Jun 2026 11:36:44 +0200, Mukesh Ojha
<mukesh.ojha@oss.qualcomm.com> said:
> qcom_scm_probe() acquires two non-devres resources that are never
> released if probe fails or defers after them. of_reserved_mem_device_init()
> adds an entry to a global list with no devres counterpart, so a retry
> would add a duplicate entry and leak the original. qcom_tzmem_enable()
> sets a static qcom_tzmem_dev pointer and may set qcom_tzmem_using_shm_bridge;
> without cleanup a probe retry finds qcom_tzmem_dev already set and
> returns -EBUSY, permanently preventing the driver from probing.
>
> Introduce err_tzmem and err_rmem goto labels at the end of probe to
> call qcom_tzmem_disable() and of_reserved_mem_device_release() in the
> right order, route all subsequent error paths through them, and add
> qcom_tzmem_disable() to qcom_tzmem.c to clear the static state.
>
> Fixes: a33b2579c8d3 ("firmware: qcom: scm: add support for SHM bridge memory carveout")
> Fixes: 40289e35ca52 ("firmware: qcom: scm: enable the TZ mem allocator")
> Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
> ---
Hi!
These are two separate issues, I think you should split the change into two
patches.
> This is reported on sasiko review as existing issue here
> https://lore.kernel.org/all/20260624192213.C82691F000E9@smtp.kernel.org/
> and it can go independently.
>
> drivers/firmware/qcom/qcom_scm.c | 42 +++++++++++++++++++++---------
> drivers/firmware/qcom/qcom_tzmem.c | 7 +++++
> drivers/firmware/qcom/qcom_tzmem.h | 1 +
> 3 files changed, 37 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> index ba5cdeed8a04..cb3d776fa645 100644
> --- a/drivers/firmware/qcom/qcom_scm.c
> +++ b/drivers/firmware/qcom/qcom_scm.c
> @@ -2883,9 +2883,11 @@ static int qcom_scm_probe(struct platform_device *pdev)
> "Failed to setup the reserved memory region for TZ mem\n");
>
> ret = qcom_tzmem_enable(scm->dev);
> - if (ret)
> - return dev_err_probe(scm->dev, ret,
> - "Failed to enable the TrustZone memory allocator\n");
> + if (ret) {
> + ret = dev_err_probe(scm->dev, ret,
> + "Failed to enable the TrustZone memory allocator\n");
> + goto err_rmem;
> + }
>
> memset(&pool_config, 0, sizeof(pool_config));
> pool_config.initial_size = 0;
> @@ -2893,16 +2895,20 @@ static int qcom_scm_probe(struct platform_device *pdev)
> pool_config.max_size = SZ_256K;
>
> scm->mempool = devm_qcom_tzmem_pool_new(scm->dev, &pool_config);
> - if (IS_ERR(scm->mempool))
> - return dev_err_probe(scm->dev, PTR_ERR(scm->mempool),
> - "Failed to create the SCM memory pool\n");
> + if (IS_ERR(scm->mempool)) {
> + ret = dev_err_probe(scm->dev, PTR_ERR(scm->mempool),
> + "Failed to create the SCM memory pool\n");
> + goto err_tzmem;
> + }
>
> ret = qcom_scm_query_waitq_count(scm);
> scm->wq_cnt = ret < 0 ? QCOM_SCM_DEFAULT_WAITQ_COUNT : ret;
> scm->waitq_comps = devm_kcalloc(&pdev->dev, scm->wq_cnt, sizeof(*scm->waitq_comps),
> GFP_KERNEL);
> - if (!scm->waitq_comps)
> - return -ENOMEM;
> + if (!scm->waitq_comps) {
> + ret = -ENOMEM;
> + goto err_tzmem;
> + }
>
> for (i = 0; i < scm->wq_cnt; i++)
> init_completion(&scm->waitq_comps[i]);
> @@ -2912,14 +2918,18 @@ static int qcom_scm_probe(struct platform_device *pdev)
> irq = platform_get_irq_optional(pdev, 0);
>
> if (irq < 0) {
> - if (irq != -ENXIO)
> - return irq;
> + if (irq != -ENXIO) {
> + ret = irq;
> + goto err_tzmem;
> + }
> } else {
> ret = devm_request_threaded_irq(scm->dev, irq, NULL, qcom_scm_irq_handler,
> IRQF_ONESHOT, "qcom-scm", scm);
> - if (ret < 0)
> - return dev_err_probe(scm->dev, ret,
> - "Failed to request qcom-scm irq\n");
> + if (ret < 0) {
> + ret = dev_err_probe(scm->dev, ret,
> + "Failed to request qcom-scm irq\n");
> + goto err_tzmem;
> + }
> }
>
> /*
> @@ -2966,6 +2976,12 @@ static int qcom_scm_probe(struct platform_device *pdev)
> qcom_scm_gunyah_wdt_init(scm);
>
> return 0;
> +
> +err_tzmem:
> + qcom_tzmem_disable(scm->dev);
> +err_rmem:
> + of_reserved_mem_device_release(scm->dev);
> + return ret;
> }
>
> static void qcom_scm_shutdown(struct platform_device *pdev)
> diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
> index 0635cbeacfc8..3f2b782f4a94 100644
> --- a/drivers/firmware/qcom/qcom_tzmem.c
> +++ b/drivers/firmware/qcom/qcom_tzmem.c
> @@ -518,6 +518,13 @@ int qcom_tzmem_enable(struct device *dev)
> }
> EXPORT_SYMBOL_GPL(qcom_tzmem_enable);
>
> +void qcom_tzmem_disable(struct device *dev)
> +{
> + qcom_tzmem_using_shm_bridge = false;
> + qcom_tzmem_dev = NULL;
> +}
> +EXPORT_SYMBOL_GPL(qcom_tzmem_disable);
That being said, I think we should just modify qcom_tzmem_enable() to silently
ignore subsequent calls. It's meant to be called once and stay enabled so I
suggest just removing the check returning -EBUSY.
Bart
> +
> MODULE_DESCRIPTION("TrustZone memory allocator for Qualcomm firmware drivers");
> MODULE_AUTHOR("Bartosz Golaszewski <bartosz.golaszewski@linaro.org>");
> MODULE_LICENSE("GPL");
> diff --git a/drivers/firmware/qcom/qcom_tzmem.h b/drivers/firmware/qcom/qcom_tzmem.h
> index 8fa8a3eb940e..0b0f26d4e22e 100644
> --- a/drivers/firmware/qcom/qcom_tzmem.h
> +++ b/drivers/firmware/qcom/qcom_tzmem.h
> @@ -9,5 +9,6 @@
> struct device;
>
> int qcom_tzmem_enable(struct device *dev);
> +void qcom_tzmem_disable(struct device *dev);
>
> #endif /* __QCOM_TZMEM_PRIV_H */
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure
2026-06-25 10:06 ` Bartosz Golaszewski
@ 2026-06-25 11:27 ` Mukesh Ojha
2026-06-25 13:18 ` Bartosz Golaszewski
0 siblings, 1 reply; 5+ messages in thread
From: Mukesh Ojha @ 2026-06-25 11:27 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: linux-arm-msm, linux-kernel, Bjorn Andersson, Konrad Dybcio,
Elliot Berman, Andrew Halaney
On Thu, Jun 25, 2026 at 03:06:07AM -0700, Bartosz Golaszewski wrote:
> On Thu, 25 Jun 2026 11:36:44 +0200, Mukesh Ojha
> <mukesh.ojha@oss.qualcomm.com> said:
> > qcom_scm_probe() acquires two non-devres resources that are never
> > released if probe fails or defers after them. of_reserved_mem_device_init()
> > adds an entry to a global list with no devres counterpart, so a retry
> > would add a duplicate entry and leak the original. qcom_tzmem_enable()
> > sets a static qcom_tzmem_dev pointer and may set qcom_tzmem_using_shm_bridge;
> > without cleanup a probe retry finds qcom_tzmem_dev already set and
> > returns -EBUSY, permanently preventing the driver from probing.
> >
> > Introduce err_tzmem and err_rmem goto labels at the end of probe to
> > call qcom_tzmem_disable() and of_reserved_mem_device_release() in the
> > right order, route all subsequent error paths through them, and add
> > qcom_tzmem_disable() to qcom_tzmem.c to clear the static state.
> >
> > Fixes: a33b2579c8d3 ("firmware: qcom: scm: add support for SHM bridge memory carveout")
> > Fixes: 40289e35ca52 ("firmware: qcom: scm: enable the TZ mem allocator")
> > Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
> > ---
>
> Hi!
>
> These are two separate issues, I think you should split the change into two
> patches.
Initially, thought of doing this but modifying the same goto
level again added in the previous patch was not looking nice.
>
> > This is reported on sasiko review as existing issue here
> > https://lore.kernel.org/all/20260624192213.C82691F000E9@smtp.kernel.org/
> > and it can go independently.
> >
> > drivers/firmware/qcom/qcom_scm.c | 42 +++++++++++++++++++++---------
> > drivers/firmware/qcom/qcom_tzmem.c | 7 +++++
> > drivers/firmware/qcom/qcom_tzmem.h | 1 +
> > 3 files changed, 37 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> > index ba5cdeed8a04..cb3d776fa645 100644
> > --- a/drivers/firmware/qcom/qcom_scm.c
> > +++ b/drivers/firmware/qcom/qcom_scm.c
> > @@ -2883,9 +2883,11 @@ static int qcom_scm_probe(struct platform_device *pdev)
> > "Failed to setup the reserved memory region for TZ mem\n");
> >
> > ret = qcom_tzmem_enable(scm->dev);
> > - if (ret)
> > - return dev_err_probe(scm->dev, ret,
> > - "Failed to enable the TrustZone memory allocator\n");
> > + if (ret) {
> > + ret = dev_err_probe(scm->dev, ret,
> > + "Failed to enable the TrustZone memory allocator\n");
> > + goto err_rmem;
> > + }
> >
> > memset(&pool_config, 0, sizeof(pool_config));
> > pool_config.initial_size = 0;
> > @@ -2893,16 +2895,20 @@ static int qcom_scm_probe(struct platform_device *pdev)
> > pool_config.max_size = SZ_256K;
> >
> > scm->mempool = devm_qcom_tzmem_pool_new(scm->dev, &pool_config);
> > - if (IS_ERR(scm->mempool))
> > - return dev_err_probe(scm->dev, PTR_ERR(scm->mempool),
> > - "Failed to create the SCM memory pool\n");
> > + if (IS_ERR(scm->mempool)) {
> > + ret = dev_err_probe(scm->dev, PTR_ERR(scm->mempool),
> > + "Failed to create the SCM memory pool\n");
> > + goto err_tzmem;
> > + }
> >
> > ret = qcom_scm_query_waitq_count(scm);
> > scm->wq_cnt = ret < 0 ? QCOM_SCM_DEFAULT_WAITQ_COUNT : ret;
> > scm->waitq_comps = devm_kcalloc(&pdev->dev, scm->wq_cnt, sizeof(*scm->waitq_comps),
> > GFP_KERNEL);
> > - if (!scm->waitq_comps)
> > - return -ENOMEM;
> > + if (!scm->waitq_comps) {
> > + ret = -ENOMEM;
> > + goto err_tzmem;
> > + }
> >
> > for (i = 0; i < scm->wq_cnt; i++)
> > init_completion(&scm->waitq_comps[i]);
> > @@ -2912,14 +2918,18 @@ static int qcom_scm_probe(struct platform_device *pdev)
> > irq = platform_get_irq_optional(pdev, 0);
> >
> > if (irq < 0) {
> > - if (irq != -ENXIO)
> > - return irq;
> > + if (irq != -ENXIO) {
> > + ret = irq;
> > + goto err_tzmem;
> > + }
> > } else {
> > ret = devm_request_threaded_irq(scm->dev, irq, NULL, qcom_scm_irq_handler,
> > IRQF_ONESHOT, "qcom-scm", scm);
> > - if (ret < 0)
> > - return dev_err_probe(scm->dev, ret,
> > - "Failed to request qcom-scm irq\n");
> > + if (ret < 0) {
> > + ret = dev_err_probe(scm->dev, ret,
> > + "Failed to request qcom-scm irq\n");
> > + goto err_tzmem;
> > + }
> > }
> >
> > /*
> > @@ -2966,6 +2976,12 @@ static int qcom_scm_probe(struct platform_device *pdev)
> > qcom_scm_gunyah_wdt_init(scm);
> >
> > return 0;
> > +
> > +err_tzmem:
> > + qcom_tzmem_disable(scm->dev);
> > +err_rmem:
> > + of_reserved_mem_device_release(scm->dev);
> > + return ret;
> > }
> >
> > static void qcom_scm_shutdown(struct platform_device *pdev)
> > diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
> > index 0635cbeacfc8..3f2b782f4a94 100644
> > --- a/drivers/firmware/qcom/qcom_tzmem.c
> > +++ b/drivers/firmware/qcom/qcom_tzmem.c
> > @@ -518,6 +518,13 @@ int qcom_tzmem_enable(struct device *dev)
> > }
> > EXPORT_SYMBOL_GPL(qcom_tzmem_enable);
> >
> > +void qcom_tzmem_disable(struct device *dev)
> > +{
> > + qcom_tzmem_using_shm_bridge = false;
> > + qcom_tzmem_dev = NULL;
> > +}
> > +EXPORT_SYMBOL_GPL(qcom_tzmem_disable);
>
> That being said, I think we should just modify qcom_tzmem_enable() to silently
> ignore subsequent calls. It's meant to be called once and stay enabled so I
> suggest just removing the check returning -EBUSY.
So, you meant to let it call twice..even if it is doing.
>
> Bart
>
> > +
> > MODULE_DESCRIPTION("TrustZone memory allocator for Qualcomm firmware drivers");
> > MODULE_AUTHOR("Bartosz Golaszewski <bartosz.golaszewski@linaro.org>");
> > MODULE_LICENSE("GPL");
> > diff --git a/drivers/firmware/qcom/qcom_tzmem.h b/drivers/firmware/qcom/qcom_tzmem.h
> > index 8fa8a3eb940e..0b0f26d4e22e 100644
> > --- a/drivers/firmware/qcom/qcom_tzmem.h
> > +++ b/drivers/firmware/qcom/qcom_tzmem.h
> > @@ -9,5 +9,6 @@
> > struct device;
> >
> > int qcom_tzmem_enable(struct device *dev);
> > +void qcom_tzmem_disable(struct device *dev);
> >
> > #endif /* __QCOM_TZMEM_PRIV_H */
> > --
> > 2.53.0
> >
> >
--
-Mukesh Ojha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure
2026-06-25 11:27 ` Mukesh Ojha
@ 2026-06-25 13:18 ` Bartosz Golaszewski
0 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-06-25 13:18 UTC (permalink / raw)
To: Mukesh Ojha
Cc: linux-arm-msm, linux-kernel, Bjorn Andersson, Konrad Dybcio,
Elliot Berman, Andrew Halaney, Bartosz Golaszewski
On Thu, 25 Jun 2026 13:27:50 +0200, Mukesh Ojha
<mukesh.ojha@oss.qualcomm.com> said:
> On Thu, Jun 25, 2026 at 03:06:07AM -0700, Bartosz Golaszewski wrote:
>>
>> That being said, I think we should just modify qcom_tzmem_enable() to silently
>> ignore subsequent calls. It's meant to be called once and stay enabled so I
>> suggest just removing the check returning -EBUSY.
>
> So, you meant to let it call twice..even if it is doing.
>
Or maybe just use DO_ONCE()?
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure
2026-06-25 9:36 [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure Mukesh Ojha
2026-06-25 10:06 ` Bartosz Golaszewski
@ 2026-08-15 17:36 ` kernel test robot
1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-08-15 17:36 UTC (permalink / raw)
To: Mukesh Ojha, Bjorn Andersson, Konrad Dybcio, Bartosz Golaszewski,
Elliot Berman, Andrew Halaney
Cc: oe-kbuild-all, linux-arm-msm, linux-kernel, Mukesh Ojha
Hi Mukesh,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.2-rc7]
[cannot apply to next-20260814]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mukesh-Ojha/firmware-qcom-scm-Fix-resource-cleanup-on-probe-failure/20260815-220308
base: linus/master
patch link: https://lore.kernel.org/r/20260625093644.3918184-1-mukesh.ojha%40oss.qualcomm.com
patch subject: [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260816/202608160100.66rYQ6on-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260816/202608160100.66rYQ6on-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608160100.66rYQ6on-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/firmware/qcom/qcom_tzmem.c: In function 'qcom_tzmem_disable':
>> drivers/firmware/qcom/qcom_tzmem.c:523:9: error: 'qcom_tzmem_using_shm_bridge' undeclared (first use in this function)
523 | qcom_tzmem_using_shm_bridge = false;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/qcom/qcom_tzmem.c:523:9: note: each undeclared identifier is reported only once for each function it appears in
vim +/qcom_tzmem_using_shm_bridge +523 drivers/firmware/qcom/qcom_tzmem.c
520
521 void qcom_tzmem_disable(struct device *dev)
522 {
> 523 qcom_tzmem_using_shm_bridge = false;
524 qcom_tzmem_dev = NULL;
525 }
526 EXPORT_SYMBOL_GPL(qcom_tzmem_disable);
527
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-15 17:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-25 9:36 [PATCH] firmware: qcom: scm: Fix resource cleanup on probe failure Mukesh Ojha
2026-06-25 10:06 ` Bartosz Golaszewski
2026-06-25 11:27 ` Mukesh Ojha
2026-06-25 13:18 ` Bartosz Golaszewski
2026-08-15 17:36 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.