* [PATCH] reset: scmi: Set the device for the reset controller
@ 2026-10-02 8:41 Kunihiko Hayashi
2026-10-02 8:52 ` Sudeep Holla
2026-11-03 10:59 ` Philipp Zabel
0 siblings, 2 replies; 3+ messages in thread
From: Kunihiko Hayashi @ 2026-10-02 8:41 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Philipp Zabel
Cc: arm-scmi, linux-arm-kernel, linux-kernel, Kunihiko Hayashi
SCMI reset driver does not set rcdev.dev when registering its reset
controller.
If rcdev.of_node is not available, the reset core tries to obtain
the firmware node from rcdev.dev. However, rcdev.dev is also NULL,
causing a NULL pointer dereference.
Set rcdev.dev to the SCMI device.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
drivers/reset/reset-scmi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/reset/reset-scmi.c b/drivers/reset/reset-scmi.c
index 8be5743cc8fd..1523245f83ef 100644
--- a/drivers/reset/reset-scmi.c
+++ b/drivers/reset/reset-scmi.c
@@ -107,6 +107,7 @@ static int scmi_reset_probe(struct scmi_device *sdev)
data->rcdev.ops = &scmi_reset_ops;
data->rcdev.owner = THIS_MODULE;
+ data->rcdev.dev = dev;
data->rcdev.of_node = np;
data->rcdev.nr_resets = reset_ops->num_domains_get(ph);
data->ph = ph;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] reset: scmi: Set the device for the reset controller
2026-10-02 8:41 [PATCH] reset: scmi: Set the device for the reset controller Kunihiko Hayashi
@ 2026-10-02 8:52 ` Sudeep Holla
2026-11-03 10:59 ` Philipp Zabel
1 sibling, 0 replies; 3+ messages in thread
From: Sudeep Holla @ 2026-10-02 8:52 UTC (permalink / raw)
To: Kunihiko Hayashi, Philipp Zabel
Cc: Cristian Marussi, arm-scmi, linux-arm-kernel, linux-kernel
On Fri, Oct 02, 2026 at 05:41:42PM +0900, Kunihiko Hayashi wrote:
> SCMI reset driver does not set rcdev.dev when registering its reset
> controller.
>
> If rcdev.of_node is not available, the reset core tries to obtain
> the firmware node from rcdev.dev. However, rcdev.dev is also NULL,
> causing a NULL pointer dereference.
>
> Set rcdev.dev to the SCMI device.
>
Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org>
Worth adding fixes tag IMO
Fixes: c8ae9c2da1cc ("reset: Add support for resets provided by SCMI")
Hi Philipp,
Can you please take this in your next round of fixes and/or updates ?
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] reset: scmi: Set the device for the reset controller
2026-10-02 8:41 [PATCH] reset: scmi: Set the device for the reset controller Kunihiko Hayashi
2026-10-02 8:52 ` Sudeep Holla
@ 2026-11-03 10:59 ` Philipp Zabel
1 sibling, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2026-11-03 10:59 UTC (permalink / raw)
To: Kunihiko Hayashi, Sudeep Holla, Cristian Marussi
Cc: arm-scmi, linux-arm-kernel, linux-kernel
On Fr, 2026-10-02 at 17:41 +0900, Kunihiko Hayashi wrote:
> SCMI reset driver does not set rcdev.dev when registering its reset
> controller.
>
> If rcdev.of_node is not available, the reset core tries to obtain
> the firmware node from rcdev.dev. However, rcdev.dev is also NULL,
> causing a NULL pointer dereference.
>
> [...]
Applied to reset/fixes, thanks!
[1/1] reset: scmi: Set the device for the reset controller
https://git.kernel.org/pub/scm/linux/kernel/git/pza/linux.git/commit/?id=e3e068a457ce
regards
Philipp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-03 10:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 8:41 [PATCH] reset: scmi: Set the device for the reset controller Kunihiko Hayashi
2026-10-02 8:52 ` Sudeep Holla
2026-11-03 10:59 ` Philipp Zabel
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®