* [PATCH v2 1/1] firmware: stratix10-svc: fix bug in saving controller data
[not found] <cover.1761740742.git.khairul.anuar.romli@altera.com>
@ 2025-10-29 12:31 ` Khairul Anuar Romli
2025-10-30 11:48 ` Dinh Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Khairul Anuar Romli @ 2025-10-29 12:31 UTC (permalink / raw)
To: Dinh Nguyen, linux-kernel, Ang Tien Sung, Khairul Anuar Romli
Fix the incorrect usage of platform_set_drvdata and dev_set_drvdata. They
both are of the same data and overrides each other. This resulted in the
rmmod of the svc driver to fail and throw a kernel panic for kthread_stop
and fifo free.
Fixes: bf0e5bf68a20 ("firmware: stratix10-svc: extend svc to support new RSU features")
cc: stable@vger.kernel.org # 6.6+
Signed-off-by: Ang Tien Sung <tiensung.ang@altera.com>
Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
---
Changes in v2:
- Add CC that was missed in the v1 and original patch from 2023
---
drivers/firmware/stratix10-svc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index 3acfa067c5dd..41f53d1e9d91 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -256,6 +256,7 @@ struct stratix10_async_ctrl {
* @svc_fifo_lock: protect access to service message data queue
* @invoke_fn: function to issue secure monitor call or hypervisor call
* @actrl: async control structure
+ * @svc: manages the list of client svc drivers
*
* This struct is used to create communication channels for service clients, to
* handle secure monitor or hypervisor call.
@@ -273,6 +274,7 @@ struct stratix10_svc_controller {
spinlock_t svc_fifo_lock;
svc_invoke_fn *invoke_fn;
struct stratix10_async_ctrl actrl;
+ struct stratix10_svc *svc;
};
/**
@@ -1950,6 +1952,7 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
ret = -ENOMEM;
goto err_free_kfifo;
}
+ controller->svc = svc;
svc->stratix10_svc_rsu = platform_device_alloc(STRATIX10_RSU, 0);
if (!svc->stratix10_svc_rsu) {
@@ -1981,8 +1984,6 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
if (ret)
goto err_unregister_fcs_dev;
- dev_set_drvdata(dev, svc);
-
pr_info("Intel Service Layer Driver Initialized\n");
return 0;
@@ -2002,8 +2003,8 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
static void stratix10_svc_drv_remove(struct platform_device *pdev)
{
- struct stratix10_svc *svc = dev_get_drvdata(&pdev->dev);
struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev);
+ struct stratix10_svc *svc = ctrl->svc;
stratix10_svc_async_exit(ctrl);
--
2.43.7
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] firmware: stratix10-svc: fix bug in saving controller data
2025-10-29 12:31 ` [PATCH v2 1/1] firmware: stratix10-svc: fix bug in saving controller data Khairul Anuar Romli
@ 2025-10-30 11:48 ` Dinh Nguyen
2025-10-31 0:13 ` [PATCH] Some subject line Khairul Anuar Romli
0 siblings, 1 reply; 4+ messages in thread
From: Dinh Nguyen @ 2025-10-30 11:48 UTC (permalink / raw)
To: Khairul Anuar Romli, linux-kernel, Ang Tien Sung
On 10/29/25 07:31, Khairul Anuar Romli wrote:
> Fix the incorrect usage of platform_set_drvdata and dev_set_drvdata. They
> both are of the same data and overrides each other. This resulted in the
> rmmod of the svc driver to fail and throw a kernel panic for kthread_stop
> and fifo free.
>
> Fixes: bf0e5bf68a20 ("firmware: stratix10-svc: extend svc to support new RSU features")
> cc: stable@vger.kernel.org # 6.6+
Please read the stable kernel rules documentation for future submissions:
stable-kernel-rules.rst
> Signed-off-by: Ang Tien Sung <tiensung.ang@altera.com>
> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
> ---
> Changes in v2:
> - Add CC that was missed in the v1 and original patch from 2023
> ---
> drivers/firmware/stratix10-svc.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
This patch does not apply cleanly on v6.18-rc1. Please rebase and resubmit.
Thanks,
Dinh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Some subject line
2025-10-30 11:48 ` Dinh Nguyen
@ 2025-10-31 0:13 ` Khairul Anuar Romli
2025-10-31 12:07 ` Dinh Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Khairul Anuar Romli @ 2025-10-31 0:13 UTC (permalink / raw)
To: dinguyen; +Cc: khairul.anuar.romli, linux-kernel, tiensung.ang
From: Khairul A. Romli <khairul.anuar.romli@altera.com>
Re: [PATCH v2 1/1] firmware: stratix10-svc: fix bug in saving controller data
I am using the same approach for sending the fix to stable branch like the
I sent and get accepted like the following example recent example.
https://lore.kernel.org/all/910aad68ba5d948919a7b90fa85a2fadb687229b.1757491372.git.khairul.anuar.romli@altera.com/
Can you point out what is wrong with
cc: stable@vger.kernel.org # 6.6+
that not comply with stable-kernel-rules.rst ? Is it due to the Fixes already not in mainline?
I rebase this patch on top of your svc_driver_for_v6.19. Should i use base v6.18-rc1 from torvalds repo instead of yours?
Thanks.
Regards,
Khairul
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Some subject line
2025-10-31 0:13 ` [PATCH] Some subject line Khairul Anuar Romli
@ 2025-10-31 12:07 ` Dinh Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Dinh Nguyen @ 2025-10-31 12:07 UTC (permalink / raw)
To: Khairul Anuar Romli; +Cc: linux-kernel, tiensung.ang
On 10/30/25 19:13, Khairul Anuar Romli wrote:
> From: Khairul A. Romli <khairul.anuar.romli@altera.com>
>
> Re: [PATCH v2 1/1] firmware: stratix10-svc: fix bug in saving controller data
>
> I am using the same approach for sending the fix to stable branch like the
> I sent and get accepted like the following example recent example.
>
> https://lore.kernel.org/all/910aad68ba5d948919a7b90fa85a2fadb687229b.1757491372.git.khairul.anuar.romli@altera.com/
>
> Can you point out what is wrong with
> cc: stable@vger.kernel.org # 6.6+
It should be Cc.
Dinh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-31 12:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1761740742.git.khairul.anuar.romli@altera.com>
2025-10-29 12:31 ` [PATCH v2 1/1] firmware: stratix10-svc: fix bug in saving controller data Khairul Anuar Romli
2025-10-30 11:48 ` Dinh Nguyen
2025-10-31 0:13 ` [PATCH] Some subject line Khairul Anuar Romli
2025-10-31 12:07 ` Dinh Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®