]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: phy: phy driver features are mandatory
authorCamelia Groza <camelia.groza@nxp.com>
Thu, 17 Jan 2019 12:22:36 +0000 (14:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 07:15:33 +0000 (08:15 +0100)
commit850d84830a6716b190ab44bcbcee15b34a41cc80
tree9eed82cc4f4ca5957372c6fbf9c6ddcd28632ef1
parent3bd1595be7b0f07b0c33840eded0eb4db3f400a2
net: phy: phy driver features are mandatory

[ Upstream commit 3e64cf7a435ed0500e3adaa8aada2272d3ae8abc ]

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.

Prevent the phy driver from registering if the features field is missing.

Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap")
Reported-by: Scott Wood <oss@buserror.net>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/phy_device.c
include/linux/phy.h