Masahiro Yamada 35b42dce61 net: mdio: unexport __init-annotated mdio_bus_init()
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: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-06-08 10:10:13 -07:00
..
2022-05-31 09:56:54 -07:00
2022-05-23 14:14:50 -07:00
2022-05-31 09:56:54 -07:00
2022-05-31 09:56:54 -07:00
2022-05-15 18:31:28 -06:00
2022-05-29 11:38:27 -07:00
2022-05-26 10:50:30 -07:00
2022-05-28 11:27:17 -07:00
2022-05-29 11:38:27 -07:00
2022-05-25 16:18:27 -07:00
2022-06-01 13:49:15 -07:00
2022-05-25 16:18:27 -07:00
2022-05-24 16:19:30 -07:00
2022-05-26 21:08:40 -07:00
2022-05-31 09:56:54 -07:00
2022-05-26 14:51:38 -07:00
2022-05-25 12:22:58 -07:00
2022-05-28 11:27:17 -07:00
2022-05-30 10:56:18 -07:00
2022-05-24 15:13:30 -07:00
2022-05-27 21:24:19 -07:00
2022-05-26 21:08:40 -07:00
2022-05-25 16:18:27 -07:00
2022-05-25 15:02:26 +02:00
2022-06-02 12:11:25 -07:00
2022-05-23 21:06:11 -07:00
2022-05-30 11:01:50 -07:00
2022-05-22 23:03:29 +02:00
2022-06-01 14:48:13 -07:00
2022-06-01 13:49:15 -07:00
2022-05-28 11:39:01 -07:00
2022-06-01 10:30:18 -07:00
2022-05-11 08:29:11 +03:00
2022-05-25 16:55:16 -07:00
2022-05-25 19:09:48 -07:00
2022-05-26 10:32:47 -07:00
2022-05-31 09:56:54 -07:00
2022-05-30 11:30:16 -07:00
2022-05-18 12:31:31 -04:00
2022-06-01 13:49:15 -07:00
2022-05-25 13:56:57 -07:00
2022-05-25 19:18:36 -07:00