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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 29 Aug 2023 16:05:03 +0200
From: Alexander Stein <alexander.stein@...tq-group.com>
To: Alexandre Torgue <alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>, "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next] net: stmmac: failure to probe without MAC interface specified

Am Dienstag, 29. August 2023, 15:29:50 CEST schrieb Russell King (Oracle):
> Alexander Stein reports that commit a014c35556b9 ("net: stmmac: clarify
> difference between "interface" and "phy_interface"") caused breakage,
> because plat->mac_interface will never be negative. Fix this by using
> the "rc" temporary variable in stmmac_probe_config_dt().
> 
> Reported-by: Alexander Stein <alexander.stein@...tq-group.com>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> ---
> I don't think the net tree is up to date with the net-next, so this
> patch needs applying to net-next preferably before the pull request
> to fix a regression.

On top of next-20230829:
Tested-by: Alexander Stein <alexander.stein@...tq-group.com>

Thanks

> Thanks.
> 
>  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index
> 35f4b1484029..0f28795e581c 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -419,9 +419,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8
> *mac) return ERR_PTR(phy_mode);
> 
>  	plat->phy_interface = phy_mode;
> -	plat->mac_interface = stmmac_of_get_mac_mode(np);
> -	if (plat->mac_interface < 0)
> -		plat->mac_interface = plat->phy_interface;
> +	rc = stmmac_of_get_mac_mode(np);
> +	plat->mac_interface = rc < 0 ? plat->phy_interface : rc;
> 
>  	/* Some wrapper drivers still rely on phy_node. Let's save it while
>  	 * they are not converted to phylink. */


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ