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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 29 Oct 2022 20:05:08 +0200 From: Andrew Lunn <andrew@...n.ch> To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com> Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org, netdev@...r.kernel.org, devicetree@...r.kernel.org, linux-renesas-soc@...r.kernel.org Subject: Re: [PATCH v6 2/3] net: ethernet: renesas: Add support for "Ethernet Switch" > + 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(). Andrew
Powered by blists - more mailing lists