🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
4 messages
4 total messages Started by Haotian Zhang Thu, 08 Oct 2026 17:56
[PATCH] net: mdio: mdio-mux: fix device_node reference leak on success
#828
Author: Haotian Zhang
Date: Thu, 08 Oct 2026 17:56
31 lines
6650 bytes
mdio_mux_init() obtains a reference to the parent bus device_node with
of_parse_phandle() when no mux_bus is passed in. All error paths release
it through err_parent_bus, but the success path at the end of the
function returns without calling of_node_put(). of_mdio_find_bus() only
takes a reference to the embedded struct device, so the device_node
reference is leaked for every multiplexer that probes successfully.

Release parent_bus_node before returning from the success path.

Fixes: 0ca2997d1452 ("netdev/of/phy: Add MDIO bus multiplexer support.")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
---
 drivers/net/mdio/mdio-mux.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mdio/mdio-mux.c b/drivers/net/mdio/mdio-mux.c
index fe0e46bd7964..fe752120e27b 100644
--- a/drivers/net/mdio/mdio-mux.c
+++ b/drivers/net/mdio/mdio-mux.c
@@ -240,6 +240,7 @@ int mdio_mux_init(struct device *dev,
 	}
 	if (pb->children) {
 		*mux_handle = pb;
+		of_node_put(parent_bus_node);
 		return 0;
 	}
 
-- 
2.25.1
Re: [PATCH] net: mdio: mdio-mux: fix device_node reference leak on success
#829
Author: netdev-bot+sinfo
Date: Thu, 08 Oct 2026 17:59
22 lines
6406 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.

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] net: mdio: mdio-mux: fix device_node reference leak on success
#847
Author: Andrew Lunn
Date: Thu, 08 Oct 2026 18:23
15 lines
6346 bytes
On Fri, Oct 09, 2026 at 01:56:12AM +0800, Haotian Zhang wrote:
> mdio_mux_init() obtains a reference to the parent bus device_node with
> of_parse_phandle() when no mux_bus is passed in. All error paths release
> it through err_parent_bus, but the success path at the end of the
> function returns without calling of_node_put(). of_mdio_find_bus() only
> takes a reference to the embedded struct device, so the device_node
> reference is leaked for every multiplexer that probes successfully.

What would happen if the parent bus was to go away?

    Andrew

---
pw-bot: cr
Re: [PATCH] net: mdio: mdio-mux: fix device_node reference leak on success
#1075
Author: Krzysztof Kozlowski
Date: Fri, 09 Oct 2026 06:10
55 lines
7743 bytes
On Fri, 09 Oct 2026 01:56:12 +0800, Haotian Zhang wrote:
> mdio_mux_init() obtains a reference to the parent bus device_node with
> of_parse_phandle() when no mux_bus is passed in. All error paths release
> it through err_parent_bus, but the success path at the end of the
> function returns without calling of_node_put(). of_mdio_find_bus() only
> takes a reference to the embedded struct device, so the device_node
> reference is leaked for every multiplexer that probes successfully.
> 
> Release parent_bus_node before returning from the success path.
> 
> Fixes: 0ca2997d1452 ("netdev/of/phy: Add MDIO bus multiplexer support.")
> Assisted-by: DeepSeek-V4.1-Flash
> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
> ---
>  drivers/net/mdio/mdio-mux.c | 1 +
>  1 file changed, 1 insertion(+)
> 



Multiple things here:
1. Your team ignored completely previous feedback.

2. You use multiple identities with this email, thus I actually doubt we speak
   with actual person.

3. Finally, same feedback:
You sent multiple independent patches, to multiple independent
subsystems. The amount of these patches clearly suggest this was
AI generated and most likely not tested.

More importantly, you sent all this work without properly organizing
relevant patches into patchsets. This makes reviewing difficult
and might cause multiple reviewers to address the same issue.
Replying to the entire set is impossible and requires handling each
patch independently, instead of applying or discarding the set.
Maintainers also won't see the bigger picture of your work. Quite
worrying.

This is on the verge of hostile patch: bomb us with so many
contributions, we won't be able to handle them in efficient manner,
like responding ONCE to ask you to slow down.  Considering all this
is untested and LLM generated, I have even more doubts whether this
should be considered for review.

Please read kernel documentation BEFORE posting more work. It will
explain you how to identify subsystems, how to organize your work per
subsystem (so a patchset grouping multiple patches with a short cover
letter), how to document usage of LLM and how what you should not do
if this was posted in a good faith.

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