lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fbdea48d-2bb4-4b84-8ac4-98480fa99143@gmail.com>
Date: Thu, 28 Aug 2025 12:31:53 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew@...n.ch>, Andrew Lunn <andrew+netdev@...n.ch>,
 Russell King - ARM Linux <linux@...linux.org.uk>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Eric Dumazet <edumazet@...gle.com>, David Miller <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
 Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH v3 net] net: phy: fixed_phy: fix missing calls to
 gpiod_put in fixed_mdio_bus_exit

On 8/27/2025 11:02 PM, Heiner Kallweit wrote:
> Cleanup in fixed_mdio_bus_exit() misses to call gpiod_put().
> Easiest fix is to call fixed_phy_del() for each possible phy address.
> This may consume a few cpu cycles more, but is much easier to read.
> 
> Fixes: a5597008dbc2 ("phy: fixed_phy: Add gpio to determine link up/down.")
> Cc: stable@...r.kernel.org
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
> v2:
> - rebase for net
> v3:
> - add missing blamed author
> ---
>  drivers/net/phy/fixed_phy.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
> index 033656d57..a1db96944 100644
> --- a/drivers/net/phy/fixed_phy.c
> +++ b/drivers/net/phy/fixed_phy.c
> @@ -352,17 +352,13 @@ module_init(fixed_mdio_bus_init);
>  static void __exit fixed_mdio_bus_exit(void)
>  {
>  	struct fixed_mdio_bus *fmb = &platform_fmb;
> -	struct fixed_phy *fp, *tmp;
>  
>  	mdiobus_unregister(fmb->mii_bus);
>  	mdiobus_free(fmb->mii_bus);
>  	faux_device_destroy(fdev);
>  
> -	list_for_each_entry_safe(fp, tmp, &fmb->phys, node) {
> -		list_del(&fp->node);
> -		kfree(fp);
> -	}
> -	ida_destroy(&phy_fixed_ida);
> +	for (int i = 0; i < PHY_MAX_ADDR; i++)
> +		fixed_phy_del(i);
>  }
>  module_exit(fixed_mdio_bus_exit);
>  
--
pw-bot: cr


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ