From: Zhao Feng <zhao…@cmss.chinamobile.com>
Hi,
Thanks for the second look. Both in-scope High issues were already
addressed by a follow-up patch sent later the same day:
"net: ethernet: sunplus: spl2sw: fix further OF node leaks in
probe and remove"
Message-ID: <2026…@cmss.chinamobile.com>
It drops port_np on every exit from the loop body (the two continue
paths, the three goto out_unregister_dev paths, and after each
successful iteration), drops phy_np on the -EPROBE_DEFER and
init_netdev error exits, and drops mac->phy_node both in the
out_unregister_dev unwind and in spl2sw_remove(). It applies on top
of this v2.
You are also right that the v2 commit message line about the
post-loop error paths being "covered" only referred to the
eth_ports_np reference; the follow-up patch covers the phy-handle
references on those paths as described above.
The remaining pre-existing issue (net_device registered before the
driver-private fields, phydev and NAPI instances are set up) is a
probe-ordering problem unrelated to the OF leaks; fixing it means
deferring register_netdev() until after the NAPI/phy setup, which is
beyond this series. I can look into it separately if the maintainers
want it addressed.
Thanks,
Zhao Feng
Re: [PATCH v2] net: ethernet: sunplus: spl2sw: fix OF node leak in spl2sw_probe()
- From
- zhao…@cmss.chinamobile.com (zhaofeng2)
- Organization
- Usenet Network
- Message-ID
- <2026…@cmss.chinamobile.com>
- Date
- Newsgroups
- linux.kernel.netdev