Re: [PATCH net-next v6 4/7] net: stmmac: introduce pcs_init/pcs_exit stmmac operations

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

 



Hello Simon,

On Sat, 11 May 2024, Simon Horman wrote:

> > -	if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) {
> > +	if (priv->plat->pcs_init) {
> > +		ret = priv->plat->pcs_init(priv);
> > +	} else if (priv->plat->mdio_bus_data &&
> > +		   priv->plat->mdio_bus_data->has_xpcs) {
> >  		/* Try to probe the XPCS by scanning all addresses */
> >  		for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
> >  			xpcs = xpcs_create_mdiodev(priv->mii, addr, mode);
> 
> I am unsure if this can occur, but if priv->plat->pcs_init returns 0 then
> xpcs will be used while uninitialised towards the end of this function.

Indeed this could occur, I've just sent a v7 that fixes this.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




[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