mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
35b42dce61
EXPORT_SYMBOL and __init is a bad combination because the .init.text
section is freed up after the initialization. Hence, modules cannot
use symbols annotated __init. The access to a freed symbol may end up
with kernel panic.
modpost used to detect it, but it has been broken for a decade.
Recently, I fixed modpost so it started to warn it again, then this
showed up in linux-next builds.
There are two ways to fix it:
- Remove __init
- Remove EXPORT_SYMBOL
I chose the latter for this case because the only in-tree call-site,
drivers/net/phy/phy_device.c is never compiled as modular.
(CONFIG_PHYLIB is boolean)
Fixes:
|
||
---|---|---|
.. | ||
mscc | ||
adin.c | ||
adin1100.c | ||
amd.c | ||
aquantia.h | ||
aquantia_hwmon.c | ||
aquantia_main.c | ||
at803x.c | ||
ax88796b.c | ||
bcm-cygnus.c | ||
bcm-phy-lib.c | ||
bcm-phy-lib.h | ||
bcm7xxx.c | ||
bcm63xx.c | ||
bcm87xx.c | ||
bcm54140.c | ||
bcm84881.c | ||
broadcom.c | ||
cicada.c | ||
cortina.c | ||
davicom.c | ||
dp83tc811.c | ||
dp83td510.c | ||
dp83640.c | ||
dp83640_reg.h | ||
dp83822.c | ||
dp83848.c | ||
dp83867.c | ||
dp83869.c | ||
et1011c.c | ||
fixed_phy.c | ||
icplus.c | ||
intel-xway.c | ||
Kconfig | ||
linkmode.c | ||
lxt.c | ||
Makefile | ||
marvell-88x2222.c | ||
marvell.c | ||
marvell10g.c | ||
mdio-boardinfo.c | ||
mdio-boardinfo.h | ||
mdio_bus.c | ||
mdio_device.c | ||
mdio_devres.c | ||
mediatek-ge.c | ||
meson-gxl.c | ||
micrel.c | ||
microchip.c | ||
microchip_t1.c | ||
mii_timestamper.c | ||
motorcomm.c | ||
mxl-gpy.c | ||
national.c | ||
nxp-c45-tja11xx.c | ||
nxp-tja11xx.c | ||
phy-c45.c | ||
phy-core.c | ||
phy.c | ||
phy_device.c | ||
phy_led_triggers.c | ||
phylink.c | ||
qsemi.c | ||
realtek.c | ||
rockchip.c | ||
sfp-bus.c | ||
sfp.c | ||
sfp.h | ||
smsc.c | ||
spi_ks8995.c | ||
ste10Xp.c | ||
swphy.c | ||
swphy.h | ||
teranetics.c | ||
uPD60620.c | ||
vitesse.c | ||
xilinx_gmii2rgmii.c |