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]
Message-ID: <20240412151648.653d41be@device-28.home>
Date: Fri, 12 Apr 2024 15:16:48 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Antoine Tenart <atenart@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com, Andrew Lunn
 <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>, Eric Dumazet
 <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Russell King
 <linux@...linux.org.uk>, linux-arm-kernel@...ts.infradead.org, Christophe
 Leroy <christophe.leroy@...roup.eu>, Herve Codina
 <herve.codina@...tlin.com>, Florian Fainelli <f.fainelli@...il.com>, Heiner
 Kallweit <hkallweit1@...il.com>, Vladimir Oltean <vladimir.oltean@....com>,
 Köry Maincent <kory.maincent@...tlin.com>, Jesse Brandeburg
 <jesse.brandeburg@...el.com>, Marek Behún
 <kabel@...nel.org>, Piergiorgio Beruto <piergiorgio.beruto@...il.com>,
 Oleksij Rempel <o.rempel@...gutronix.de>, Nicolò Veronese
 <nicveronese@...il.com>, Simon Horman <horms@...nel.org>,
 mwojtas@...omium.org, Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH net-next] net: phy: phy_link_topology: Handle NULL
 topologies

Hi Antoine,

On Fri, 12 Apr 2024 15:03:10 +0200
Antoine Tenart <atenart@...nel.org> wrote:

> Hi Maxime,
> 
> Quoting Maxime Chevallier (2024-04-12 12:46:14)
> > 
> > This patch fixes a commit that is in net-next, hence the net-next tag and the
> > lack of "Fixes" tag.  
> 
> You can use Fixes: on net-next, that still helps to identify which
> commit is being fixed (eg. for reviews, while looking at the history,
> etc).

Won't the tag become invalid when the commit gets merged into an -rc
release then ?

> 
> > diff --git a/drivers/net/phy/phy_link_topology.c b/drivers/net/phy/phy_link_topology.c
> > index 985941c5c558..0f3973f07fac 100644
> > --- a/drivers/net/phy/phy_link_topology.c
> > +++ b/drivers/net/phy/phy_link_topology.c
> > @@ -42,6 +42,9 @@ int phy_link_topo_add_phy(struct phy_link_topology *topo,
> >         struct phy_device_node *pdn;
> >         int ret;
> >  
> > +       if (!topo)
> > +               return 0;
> > +  
> 
> With that phy_sfp_connect_phy does not need to check the topo validity
> before calling phy_link_topo_add_phy. The other way around is fine too.
> 
> > @@ -93,7 +96,12 @@ EXPORT_SYMBOL_GPL(phy_link_topo_add_phy);
> >  void phy_link_topo_del_phy(struct phy_link_topology *topo,
> >                            struct phy_device *phy)
> >  {
> > -       struct phy_device_node *pdn = xa_erase(&topo->phys, phy->phyindex);
> > +       struct phy_device_node *pdn;
> > +
> > +       if (!topo)
> > +               return;
> > +
> > +       pdn = xa_erase(&topo->phys, phy->phyindex);  
> 
> Same here with phy_sfp_disconnect_phy.

Ah right, well spotted, thanks !

Maxime

> 
> Thanks!
> Antoine


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ