Re: [PATCH net] net: phy: guard against accessing a NULL features bitmap

2019-01-11 Thread Andrew Lunn
> > Hi Camelia > > > > A NULL features is a driver bug. So i would prefer to solve this > > differently. > > > > Please make phy_driver_register() do a WARN_ON(!new_driver->features) > > and return -EINVAL. > > I wasn't aware that features are mandatory. I'll make the change. It was not origiona

RE: [PATCH net] net: phy: guard against accessing a NULL features bitmap

2019-01-11 Thread Camelia Alexandra Groza
: Re: [PATCH net] net: phy: guard against accessing a NULL features > bitmap > > On Fri, Jan 11, 2019 at 01:56:46PM +0200, Camelia Groza wrote: > > Since phy driver features became a link_mode bitmap, phy drivers that > > don't have a list of features configured will cau

Re: [PATCH net] net: phy: guard against accessing a NULL features bitmap

2019-01-11 Thread Andrew Lunn
On Fri, Jan 11, 2019 at 01:56:46PM +0200, Camelia Groza wrote: > Since phy driver features became a link_mode bitmap, phy drivers that > don't have a list of features configured will cause the kernel to crash > when probed. Hi Camelia A NULL features is a driver bug. So i would prefer to solve th

[PATCH net] net: phy: guard against accessing a NULL features bitmap

2019-01-11 Thread Camelia Groza
Since phy driver features became a link_mode bitmap, phy drivers that don't have a list of features configured will cause the kernel to crash when probed. Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap") Reported-by: Scott Wood Signed-off-by: Camelia Groza