lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 26 Nov 2022 00:32:12 +0100
From:   Andrew Lunn <>
To:     Yang Yingliang <>
Subject: Re: [PATCH net] net: mdiobus: fix unbalanced node reference count

On Thu, Nov 24, 2022 at 11:01:30PM +0800, Yang Yingliang wrote:
> I got the following report while doing device(mscc-miim) load test
>   OF: ERROR: memory leak, expected refcount 1 instead of 2,
>   of_node_get()/of_node_put() unbalanced - destroy cset entry:
>   attach overlay node /spi/soc@...dio@...7009c/ethernet-phy@0
> If the 'fwnode' is not an acpi node, the refcount is get in
> fwnode_mdiobus_phy_device_register(), but it has never been
> put when the device is freed in the normal path. So call
> fwnode_handle_put() in phy_device_release() to avoid leak.
> If it's an acpi node, it has never been get, but it's put
> in the error path, so call fwnode_handle_get() before
> phy_device_register() to keep get/put operation balanced.
> Fixes: bc1bee3b87ee ("net: mdiobus: Introduce fwnode_mdiobus_register_phy()")
> Signed-off-by: Yang Yingliang <>

Reviewed-by: Andrew Lunn <>


Powered by blists - more mailing lists