Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Wentao Liang
Tue, 03 Nov 2026 10:29
[PATCH RESEND] net: ethernet: ti: cpts: drop the refclk mux node reference
Author: Wentao Liang
Date: Tue, 03 Nov 2026 10:29
Date: Tue, 03 Nov 2026 10:29
34 lines
9151 bytes
9151 bytes
cpts_of_mux_clk_setup() obtains refclk_np with of_get_child_by_name()
and only drops that reference on the error path. of_clk_add_hw_provider()
takes its own reference through of_node_get(), which
of_clk_del_provider() releases later, so the reference taken by
of_get_child_by_name() is leaked when the mux clock is registered
successfully.
Drop the caller's reference once the provider has been registered and
its devm cleanup action is in place.
Fixes: a3047a81ba13 ("net: ethernet: ti: cpts: add support for ext rftclk selection")
Cc: stable@vger.kernel.org
Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/net/ethernet/ti/cpts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 2ba4c8795d60..372cef13d81e 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -714,6 +714,8 @@ static int cpts_of_mux_clk_setup(struct cpts *cpts, struct device_node *node)
goto mux_fail;
}
+ of_node_put(refclk_np);
+
return ret;
mux_fail:
--
2.34.1
Re: [PATCH RESEND] net: ethernet: ti: cpts: drop the refclk mux node reference
Author: netdev-bot+sinfo
Date: Tue, 03 Nov 2026 10:35
Date: Tue, 03 Nov 2026 10:35
26 lines
8872 bytes
8872 bytes
Hi! This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information: - How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan. - Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages. - What hardware the change was tested on. For driver fixes please mention the device (and if relevant firmware version) used for testing, or say that the change was not tested on real hardware. Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then. The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Re: [PATCH RESEND] net: ethernet: ti: cpts: drop the refclk mux node reference
Author: Krzysztof Kozlowski
Date: Tue, 03 Nov 2026 10:39
Date: Tue, 03 Nov 2026 10:39
21 lines
11645 bytes
11645 bytes
On 03/11/2026 11:29, Wentao Liang wrote:
> cpts_of_mux_clk_setup() obtains refclk_np with of_get_child_by_name()
> and only drops that reference on the error path. of_clk_add_hw_provider()
> takes its own reference through of_node_get(), which
> of_clk_del_provider() releases later, so the reference taken by
> of_get_child_by_name() is leaked when the mux clock is registered
> successfully.
>
> Drop the caller's reference once the provider has been registered and
> its devm cleanup action is in place.
>
> Fixes: a3047a81ba13 ("net: ethernet: ti: cpts: add support for ext rftclk selection")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Implement comments you received, instead of resending.
Best regards,
Krzysztof
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads