linux-stable/drivers/net/phy
Russell King 126d6848ef sfp: fix oops with ethtool -m
If a network interface is created prior to the SFP socket being
available, ethtool can request module information.  This unfortunately
leads to an oops:

Unable to handle kernel NULL pointer dereference at virtual address 00000008
pgd = (ptrval)
[00000008] *pgd=7c400831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 1480 Comm: ethtool Not tainted 4.19.0-rc3 #138
Hardware name: Broadcom Northstar Plus SoC
PC is at sfp_get_module_info+0x8/0x10
LR is at dev_ethtool+0x218c/0x2afc

Fix this by not filling in the network device's SFP bus pointer until
SFP is fully bound, thereby avoiding the core calling into the SFP bus
code.

Fixes: ce0aa27ff3 ("sfp: add sfp-bus to bridge between network devices and sfp cages")
Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-18 20:14:19 -07:00
..
amd.c
aquantia.c
asix.c
at803x.c
bcm-cygnus.c net: phy: broadcom: Fix bcm_write_exp() 2018-05-23 15:27:01 -04:00
bcm-phy-lib.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-26 19:46:15 -04:00
bcm-phy-lib.h net: phy: broadcom: Fix bcm_write_exp() 2018-05-23 15:27:01 -04:00
bcm7xxx.c net: phy: Add support for Broadcom Omega internal Combo GPHY 2018-08-07 15:48:38 -07:00
bcm63xx.c
bcm87xx.c
broadcom.c net: phy: broadcom: Enable 125 MHz clock on LED4 pin for BCM54612E by default. 2018-06-05 09:43:09 -04:00
cicada.c
cortina.c
davicom.c
dp83tc811.c net: phy: DP83TC811: Fix SGMII enable/disable 2018-07-03 11:38:07 +09:00
dp83640.c net: dp83640: Mark expected switch fall-throughs 2018-08-11 11:28:34 -07:00
dp83640_reg.h
dp83822.c
dp83848.c net: phy: dp83822: use BMCR_ANENABLE instead of BMSR_ANEGCAPABLE for DP83620 2018-06-10 12:38:03 -07:00
dp83867.c
et1011c.c
fixed_phy.c net: phy: fixed-phy: Make the error path simpler 2018-06-24 16:41:58 +09:00
icplus.c
intel-xway.c
Kconfig net: phy: sfp: Do not use "imply HWMON" 2018-07-21 19:26:54 -07:00
lxt.c
Makefile net: phy: mscc-miim: Add MDIO driver 2018-05-15 16:41:15 -04:00
marvell.c net: phy: marvell: Replace mdelay() with msleep() in m88e1116r_config_init() 2018-07-27 13:45:14 -07:00
marvell10g.c
mdio-bcm-iproc.c
mdio-bcm-unimac.c
mdio-bitbang.c
mdio-boardinfo.c
mdio-boardinfo.h
mdio-cavium.c
mdio-cavium.h
mdio-gpio.c net: phy: mdio-gpio: Cut surplus includes 2018-06-12 15:23:55 -07:00
mdio-hisi-femac.c
mdio-i2c.c
mdio-i2c.h
mdio-moxart.c
mdio-mscc-miim.c drivers: net: Remove device_node checks with of_mdiobus_register() 2018-05-16 14:20:36 -04:00
mdio-mux-bcm-iproc.c net: phy: Add pm support to Broadcom iProc mdio mux driver 2018-08-02 14:36:49 -07:00
mdio-mux-gpio.c mdio-mux-gpio: Remove VLA usage 2018-06-26 23:24:07 +09:00
mdio-mux-mmioreg.c
mdio-mux.c
mdio-octeon.c
mdio-sun4i.c
mdio-thunder.c
mdio-xgene.c
mdio-xgene.h
mdio_bus.c net: phy: remove PM ops from MDIO bus 2018-06-05 08:50:16 -04:00
mdio_device.c
meson-gxl.c
micrel.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
microchip.c
microchip_t1.c microchip_t1: Add driver for Microchip LAN87XX T1 PHYs 2018-05-10 14:16:36 -04:00
mscc.c net: phy: mscc: the extended page access register is 16 bits 2018-07-30 09:42:32 -07:00
national.c
phy-c45.c
phy-core.c
phy.c net: phy: add helper phy_polling_mode 2018-07-25 13:41:22 -07:00
phy_device.c net: phy: add GBit master / slave error detection 2018-07-24 14:41:08 -07:00
phy_led_triggers.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
phylink.c phylink: add helper for configuring 2500BaseX modes 2018-08-09 11:08:19 -07:00
qsemi.c
realtek.c net: phy: realtek: Support RTL8366RB variant 2018-07-18 13:43:38 +09:00
rockchip.c
sfp-bus.c sfp: fix oops with ethtool -m 2018-09-18 20:14:19 -07:00
sfp.c net: phy: sfp: Handle unimplemented hwmon limits and alarms 2018-09-04 12:22:41 -07:00
sfp.h
smsc.c drivers: net: replace UINT64_MAX with U64_MAX 2018-04-27 20:18:55 -04:00
spi_ks8995.c
ste10Xp.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c net: phy: vitesse: Add support for VSC73xx 2018-07-04 11:30:02 +09:00
xilinx_gmii2rgmii.c net: phy: xgmiitorgmii: Check read_status results 2018-06-28 16:12:06 +09:00