RE: [PATCH v6 2/3] net: ethernet: renesas: Add support for "Ethernet Switch"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux