* [PATCH] pinctrl: aspeed-g5: fix device node leak on LPC compatible mismatch
@ 2026-10-09 4:14 Haotian Zhang
2026-10-09 6:10 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Haotian Zhang @ 2026-10-09 4:14 UTC (permalink / raw)
To: Andrew Jeffery, Linus Walleij, Joel Stanley, Ryan Chen,
Billy Tsai, Chia-Wei, Wang
Cc: linux-aspeed, openbmc, linux-gpio, linux-arm-kernel, linux-kernel
aspeed_g5_acquire_regmap() takes a reference to the LPC device node with
of_parse_phandle() and then returns -ENODEV if the node's parent is not
compatible with "aspeed,ast2500-lpc-v2", without dropping that
reference. The function is called for every pin configuration, so the
leaked device_node reference accumulates on such systems.
Release the node with of_node_put() before returning from the error path.
Fixes: eaffd32bea0c ("pinctrl: aspeed-g5: Adapt to new LPC device tree layout")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
---
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
index b0cba0f3e17e..6ab3ba89bd54 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
@@ -2652,8 +2652,11 @@ static struct regmap *aspeed_g5_acquire_regmap(struct aspeed_pinmux_data *ctx,
np = of_parse_phandle(ctx->dev->of_node,
"aspeed,external-nodes", 1);
if (np) {
- if (!of_device_is_compatible(np->parent, "aspeed,ast2500-lpc-v2"))
+ if (!of_device_is_compatible(np->parent,
+ "aspeed,ast2500-lpc-v2")) {
+ of_node_put(np);
return ERR_PTR(-ENODEV);
+ }
map = syscon_node_to_regmap(np->parent);
of_node_put(np);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: aspeed-g5: fix device node leak on LPC compatible mismatch
2026-10-09 4:14 [PATCH] pinctrl: aspeed-g5: fix device node leak on LPC compatible mismatch Haotian Zhang
@ 2026-10-09 6:10 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-09 6:10 UTC (permalink / raw)
To: Haotian Zhang
Cc: Billy Tsai, linux-aspeed, Linus Walleij, openbmc, Andrew Jeffery,
Chia-Wei, Wang, linux-gpio, Ryan Chen, linux-kernel,
linux-arm-kernel, Joel Stanley
On Fri, 09 Oct 2026 12:14:35 +0800, Haotian Zhang wrote:
> aspeed_g5_acquire_regmap() takes a reference to the LPC device node with
> of_parse_phandle() and then returns -ENODEV if the node's parent is not
> compatible with "aspeed,ast2500-lpc-v2", without dropping that
> reference. The function is called for every pin configuration, so the
> leaked device_node reference accumulates on such systems.
>
> Release the node with of_node_put() before returning from the error path.
>
> Fixes: eaffd32bea0c ("pinctrl: aspeed-g5: Adapt to new LPC device tree layout")
> Assisted-by: DeepSeek-V4.1-Flash
> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
> ---
> drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-09 6:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 4:14 [PATCH] pinctrl: aspeed-g5: fix device node leak on LPC compatible mismatch Haotian Zhang
2026-10-09 6:10 ` Krzysztof Kozlowski
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®