* [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe()
@ 2024-08-25 18:53 Krzysztof Kozlowski
2024-08-25 18:53 ` [PATCH 2/3] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-25 18:53 UTC (permalink / raw)
To: Yisen Zhuang, Salil Mehta, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: Krzysztof Kozlowski
Driver is leaking OF node reference from
of_parse_phandle_with_fixed_args() in probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/net/ethernet/hisilicon/hip04_eth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index b91e7a06b97f..beb815e5289b 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -947,6 +947,7 @@ static int hip04_mac_probe(struct platform_device *pdev)
priv->tx_coalesce_timer.function = tx_done;
priv->map = syscon_node_to_regmap(arg.np);
+ of_node_put(arg.np);
if (IS_ERR(priv->map)) {
dev_warn(d, "no syscon hisilicon,hip04-ppe\n");
ret = PTR_ERR(priv->map);
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info()
2024-08-25 18:53 [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe() Krzysztof Kozlowski
@ 2024-08-25 18:53 ` Krzysztof Kozlowski
2024-08-25 18:53 ` [PATCH 3/3] net: hisilicon: hns_mdio: fix OF node leak in probe() Krzysztof Kozlowski
2024-08-25 19:21 ` [PATCH 1/3] net: hisilicon: hip04: " Markus Elfring
2 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-25 18:53 UTC (permalink / raw)
To: Yisen Zhuang, Salil Mehta, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: Krzysztof Kozlowski
Driver is leaking OF node reference from
of_parse_phandle_with_fixed_args() in hns_mac_get_info().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
index f75668c47935..616a2768e504 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
@@ -933,6 +933,7 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
mac_cb->cpld_ctrl = NULL;
} else {
syscon = syscon_node_to_regmap(cpld_args.np);
+ of_node_put(cpld_args.np);
if (IS_ERR_OR_NULL(syscon)) {
dev_dbg(mac_cb->dev, "no cpld-syscon found!\n");
mac_cb->cpld_ctrl = NULL;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] net: hisilicon: hns_mdio: fix OF node leak in probe()
2024-08-25 18:53 [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe() Krzysztof Kozlowski
2024-08-25 18:53 ` [PATCH 2/3] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() Krzysztof Kozlowski
@ 2024-08-25 18:53 ` Krzysztof Kozlowski
2024-08-25 19:21 ` [PATCH 1/3] net: hisilicon: hip04: " Markus Elfring
2 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-25 18:53 UTC (permalink / raw)
To: Yisen Zhuang, Salil Mehta, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: Krzysztof Kozlowski
Driver is leaking OF node reference from
of_parse_phandle_with_fixed_args() in probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/net/ethernet/hisilicon/hns_mdio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c
index ed73707176c1..8a047145f0c5 100644
--- a/drivers/net/ethernet/hisilicon/hns_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hns_mdio.c
@@ -575,6 +575,7 @@ static int hns_mdio_probe(struct platform_device *pdev)
MDIO_SC_RESET_ST;
}
}
+ of_node_put(reg_args.np);
} else {
dev_warn(&pdev->dev, "find syscon ret = %#x\n", ret);
mdio_dev->subctrl_vbase = NULL;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe()
2024-08-25 18:53 [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe() Krzysztof Kozlowski
2024-08-25 18:53 ` [PATCH 2/3] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() Krzysztof Kozlowski
2024-08-25 18:53 ` [PATCH 3/3] net: hisilicon: hns_mdio: fix OF node leak in probe() Krzysztof Kozlowski
@ 2024-08-25 19:21 ` Markus Elfring
2024-08-27 14:40 ` Simon Horman
2 siblings, 1 reply; 7+ messages in thread
From: Markus Elfring @ 2024-08-25 19:21 UTC (permalink / raw)
To: Krzysztof Kozlowski, netdev, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Salil Mehta, Yisen Zhuang
Cc: LKML
> Driver is leaking OF node reference from
> of_parse_phandle_with_fixed_args() in probe().
* Is there a need to improve such a change description another bit?
+ Imperative mood
* Tags like “Fixes” and “Cc”
* Can a corresponding cover letter help?
Regards,
Markus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe()
2024-08-25 19:21 ` [PATCH 1/3] net: hisilicon: hip04: " Markus Elfring
@ 2024-08-27 14:40 ` Simon Horman
2024-08-27 14:41 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2024-08-27 14:40 UTC (permalink / raw)
To: Markus Elfring
Cc: Krzysztof Kozlowski, netdev, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Salil Mehta, Yisen Zhuang, LKML
On Sun, Aug 25, 2024 at 09:21:31PM +0200, Markus Elfring wrote:
> > Driver is leaking OF node reference from
> > of_parse_phandle_with_fixed_args() in probe().
>
> * Is there a need to improve such a change description another bit?
>
> + Imperative mood
>
> * Tags like “Fixes” and “Cc”
I think it would be helpful if these were either explicitly targeted for
net-next without Fixes tags (the assumed state of affairs as-is).
Subject: [Patch x/n net-next] ...
Or targeted at net, with Fixes tags
Subject: [Patch x/n net] ...
I guess that in theory these are fixes, as resource leaks could occur.
But perhaps that is more theory that practice. I am unsure.
> * Can a corresponding cover letter help?
I agree that would be nice, it's the usual practice for Networking
patchsets with more than one patch.
The above aside, I looked over the code changes
and I agree they are correct.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe()
2024-08-27 14:40 ` Simon Horman
@ 2024-08-27 14:41 ` Krzysztof Kozlowski
2024-08-27 14:58 ` Simon Horman
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-27 14:41 UTC (permalink / raw)
To: Simon Horman
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Salil Mehta, Yisen Zhuang, LKML
On 27/08/2024 16:40, Simon Horman wrote:
> On Sun, Aug 25, 2024 at 09:21:31PM +0200, Markus Elfring wrote:
>>> Driver is leaking OF node reference from
>>> of_parse_phandle_with_fixed_args() in probe().
>>
>> * Is there a need to improve such a change description another bit?
>>
>> + Imperative mood
>>
>> * Tags like “Fixes” and “Cc”
>
> I think it would be helpful if these were either explicitly targeted for
> net-next without Fixes tags (the assumed state of affairs as-is).
>
> Subject: [Patch x/n net-next] ...
>
> Or targeted at net, with Fixes tags
>
> Subject: [Patch x/n net] ...
>
> I guess that in theory these are fixes, as resource leaks could occur.
> But perhaps that is more theory that practice. I am unsure.
I'll resend with net-next.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe()
2024-08-27 14:41 ` Krzysztof Kozlowski
@ 2024-08-27 14:58 ` Simon Horman
0 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2024-08-27 14:58 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Salil Mehta, Yisen Zhuang, LKML
On Tue, Aug 27, 2024 at 04:41:50PM +0200, Krzysztof Kozlowski wrote:
> On 27/08/2024 16:40, Simon Horman wrote:
> > On Sun, Aug 25, 2024 at 09:21:31PM +0200, Markus Elfring wrote:
> >>> Driver is leaking OF node reference from
> >>> of_parse_phandle_with_fixed_args() in probe().
> >>
> >> * Is there a need to improve such a change description another bit?
> >>
> >> + Imperative mood
> >>
> >> * Tags like “Fixes” and “Cc”
> >
> > I think it would be helpful if these were either explicitly targeted for
> > net-next without Fixes tags (the assumed state of affairs as-is).
> >
> > Subject: [Patch x/n net-next] ...
> >
> > Or targeted at net, with Fixes tags
> >
> > Subject: [Patch x/n net] ...
> >
> > I guess that in theory these are fixes, as resource leaks could occur.
> > But perhaps that is more theory that practice. I am unsure.
>
> I'll resend with net-next.
Thanks, much appreciated.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-08-27 14:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-25 18:53 [PATCH 1/3] net: hisilicon: hip04: fix OF node leak in probe() Krzysztof Kozlowski
2024-08-25 18:53 ` [PATCH 2/3] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() Krzysztof Kozlowski
2024-08-25 18:53 ` [PATCH 3/3] net: hisilicon: hns_mdio: fix OF node leak in probe() Krzysztof Kozlowski
2024-08-25 19:21 ` [PATCH 1/3] net: hisilicon: hip04: " Markus Elfring
2024-08-27 14:40 ` Simon Horman
2024-08-27 14:41 ` Krzysztof Kozlowski
2024-08-27 14:58 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).