linux-stable/drivers/net/phy
Vladimir Oltean 1c613beaf8 net: phy: prevent stale pointer dereference in phy_init()
mdio_bus_init() and phy_driver_register() both have error paths, and if
those are ever hit, ethtool will have a stale pointer to the
phy_ethtool_phy_ops stub structure, which references memory from a
module that failed to load (phylib).

It is probably hard to force an error in this code path even manually,
but the error teardown path of phy_init() should be the same as
phy_exit(), which is now simply not the case.

Fixes: 55d8f053ce ("net: phy: Register ethtool PHY operations")
Link: https://lore.kernel.org/netdev/ZLaiJ4G6TaJYGJyU@shell.armlinux.org.uk/
Suggested-by: Russell King (Oracle) <linux@armlinux.org.uk>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20230720000231.1939689-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-07-20 12:47:25 -07:00
..
mscc net: phy: mscc: fix packet loss due to RGMII delays 2023-06-27 09:31:51 -07:00
adin.c
adin1100.c
amd.c
aquantia.h
aquantia_hwmon.c net: phy: aquantia: constify pointers to hwmon_channel_info 2023-04-09 19:02:09 -07:00
aquantia_main.c
at803x.c net: phy: at803x: Use devm_regulator_get_enable_optional() 2023-06-18 17:33:48 +01:00
ax88796b.c
bcm-cygnus.c
bcm-phy-lib.c net: phy: broadcom: Add support for setting LED brightness 2023-06-09 10:38:43 +01:00
bcm-phy-lib.h net: phy: broadcom: Add support for setting LED brightness 2023-06-09 10:38:43 +01:00
bcm-phy-ptp.c
bcm7xxx.c net: phy: bcm7xx: Correct read from expansion register 2023-05-09 20:25:52 -07:00
bcm63xx.c
bcm87xx.c
bcm54140.c net: phy: bcm54140: constify pointers to hwmon_channel_info 2023-04-09 19:02:09 -07:00
bcm84881.c
broadcom.c net: phy: broadcom: drop brcm_phy_setbits() and use phy_set_bits() instead 2023-06-24 15:05:40 -07:00
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83td510.c net: phy: dp83td510: fix kernel stall during netboot in DP83TD510E PHY driver 2023-06-22 19:43:55 -07:00
dp83640.c
dp83640_reg.h
dp83822.c net: phy: dp83822: Fix null pointer access on DP83825/DP83826 devices 2023-01-28 00:23:58 -08:00
dp83848.c
dp83867.c Revert "net: phy: dp83867: perform soft reset and retain established link" 2023-06-20 20:20:22 -07:00
dp83869.c net: phy: dp83869: support mii mode when rgmii strap cfg is used 2023-05-09 11:57:53 +02:00
et1011c.c
fixed_phy.c
icplus.c
intel-xway.c
Kconfig net: phy: mediatek: fix compile-test dependencies 2023-06-20 12:02:22 -07:00
linkmode.c
lxt.c
Makefile net: phy: add driver for MediaTek SoC built-in GE PHYs 2023-06-12 11:55:04 +01:00
marvell-88x2222.c net: phy: marvell-88x2222: remove unnecessary (void*) conversions 2023-04-25 09:43:50 +01:00
marvell.c net: phy: marvell: Fix inconsistent indenting in led_blink_set 2023-04-24 19:01:47 -07:00
marvell10g.c net: phy: marvell: constify pointers to hwmon_channel_info 2023-04-09 19:02:09 -07:00
mdio-boardinfo.c
mdio-boardinfo.h
mdio-open-alliance.h drivers/net/phy: add helpers to get/set PLCA configuration 2023-01-11 08:35:02 +00:00
mdio_bus.c net: mdio: fix the wrong parameters 2023-06-20 20:17:49 -07:00
mdio_device.c net: mdio: fix unbalanced fwnode reference count in mdio_device_release() 2022-12-06 12:50:00 +01:00
mdio_devres.c net: mdio: fix owner field for mdio buses registered using device-tree 2023-03-19 10:48:35 +00:00
mediatek-ge-soc.c net: phy: add driver for MediaTek SoC built-in GE PHYs 2023-06-12 11:55:04 +01:00
mediatek-ge.c net: phy: add driver for MediaTek SoC built-in GE PHYs 2023-06-12 11:55:04 +01:00
meson-gxl.c net: phy: meson-gxl: enable edpd tunable support for G12A internal PHY 2023-04-04 18:56:01 -07:00
micrel.c net: micrel: Change to receive timestamp in the frame for lan8841 2023-06-21 15:05:46 +01:00
microchip.c net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver 2023-03-02 22:21:07 -08:00
microchip_t1.c net: phy: microchip: run phy initialization during each link update 2023-01-23 22:34:19 -08:00
microchip_t1s.c net: phy: microchip_t1s: add support for Microchip LAN865x Rev.B0 PHYs 2023-05-30 11:49:55 +02:00
mii_timestamper.c
motorcomm.c net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify() 2023-02-15 21:23:33 -08:00
mxl-gpy.c net: phy: mxl-gpy: extend interrupt fix to all impacted variants 2023-06-01 09:59:36 -07:00
national.c
ncn26000.c drivers/net/phy: add driver for the onsemi NCN26000 10BASE-T1S PHY 2023-01-11 08:35:03 +00:00
nxp-c45-tja11xx.c net: phy: nxp-c45-tja11xx: add remove callback 2023-04-11 15:28:31 +02:00
nxp-cbtx.c net: phy: add basic driver for NXP CBTX PHY 2023-04-21 20:04:09 -07:00
nxp-tja11xx.c net: phy: nxp-tja11xx: constify pointers to hwmon_channel_info 2023-04-09 19:02:09 -07:00
phy-c45.c net: phy-c45: Fix genphy_c45_ethtool_set_eee description 2023-06-20 20:35:26 -07:00
phy-core.c drivers/net/phy: add the link modes for the 10BASE-T1S Ethernet PHY 2023-01-11 08:35:02 +00:00
phy.c net: phy: avoid kernel warning dump when stopping an errored PHY 2023-05-24 08:28:27 +01:00
phy_device.c net: phy: prevent stale pointer dereference in phy_init() 2023-07-20 12:47:25 -07:00
phy_led_triggers.c
phylink.c net: phylink: pass neg_mode into phylink_mii_c22_pcs_config() 2023-06-22 19:41:01 -07:00
qsemi.c
realtek.c net: phy: realtek: Disable clock on suspend 2023-06-07 09:52:24 +01:00
rockchip.c
sfp-bus.c net: sfp: add support for setting signalling rate 2023-05-18 19:52:31 -07:00
sfp.c net: sfp: add support for HXSX-ATRI-1 copper SFP+ module 2023-05-23 20:34:22 -07:00
sfp.h net: sfp: add support for setting signalling rate 2023-05-18 19:52:31 -07:00
smsc.c net: phy: smsc: enable edpd tunable support 2023-04-03 10:08:43 +01:00
spi_ks8995.c net: phy: ks8995: drop of_match_ptr for ID table 2023-03-15 08:11:02 +00:00
ste10Xp.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe 2022-12-30 07:46:10 +00:00