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]
Date:   Sat, 11 Mar 2023 20:09:01 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Klaus Kudielka <klaus.kudielka@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Richard Cochran <richardcochran@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] net: dsa: mv88e6xxx: move call to
 mv88e6xxx_mdios_register()

On Sat, Mar 11, 2023 at 04:19:43PM +0100, Andrew Lunn wrote:
> >  static int mv88e6xxx_setup(struct dsa_switch *ds)
> > @@ -3889,6 +3892,10 @@ static int mv88e6xxx_setup(struct dsa_switch *ds)
> >  	int err;
> >  	int i;
> >  
> > +	err = mv88e6xxx_mdios_register(chip);
> > +	if (err)
> > +		return err;
> > +
> >  	chip->ds = ds;
> >  	ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
> 
> Other calls in mv88e6xxx_setup() can fail, so you need to extend the
> cleanup to remove the mdio bus on failure.

FWIW, here is a snippet of how mv88e6xxx_setup() and mv88e6xxx_teardown()
should look like, with error handling taken into consideration (but I
was lazy and just added forward declarations, something which Klaus
handled better with the movement preparatory patch):
https://lore.kernel.org/lkml/20230210210804.vdyfrog5nq6hrxi5@skbuf/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ