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] [day] [month] [year] [list]
Message-ID: <TYBPR01MB534180187D899534F1634CBFD8379@TYBPR01MB5341.jpnprd01.prod.outlook.com>
Date:   Mon, 31 Oct 2022 08:21:10 +0000
From:   Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-renesas-soc@...r.kernel.org" 
        <linux-renesas-soc@...r.kernel.org>
Subject: RE: [PATCH v6 2/3] net: ethernet: renesas: Add support for "Ethernet
 Switch"

Hi Andrew,

> From: Andrew Lunn, Sent: Sunday, October 30, 2022 3:05 AM
> 
> > +	for (i = 0; i < RSWITCH_NUM_PORTS; i++) {
> > +		err = register_netdev(priv->rdev[i]->ndev);
> > +		if (err) {
> > +			for (i--; i >= 0; i--)
> > +				unregister_netdev(priv->rdev[i]->ndev);
> > +			goto err_register_netdev;
> > +		}
> > +	}
> > +
> > +	err = rswitch_ether_port_init_all(priv);
> > +	if (err)
> > +		goto err_ether_port_init_all;
> 
> As soon as you call register_netdev() the devices are active, and can
> be in use. E.G. NFS root can start mounting the filesystem before
> register_netdev() even returns. Is it safe to call driver operations
> before rswitch_ether_port_init_all().

Thank you for your review! It's not safe. So, I'll modify this driver somehow.

Best regards,
Yoshihiro Shimoda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ