net: phylink: avoid resolving link state too early
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 11 Feb 2019 15:04:24 +0000 (15:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 17:25:18 +0000 (12:25 -0500)
commit87454b6edc1b0143fdb3d9853285477e95af74a4
treeb1825d783af262f1601dc91f7ead403884a058df
parenta7603ac1fc8ce1409f8ff70e6ce505f308b2c002
net: phylink: avoid resolving link state too early

During testing on Armada 388 platforms, it was found with a certain
module configuration that it was possible to trigger a kernel oops
during the module load process, caused by the phylink resolver being
triggered for a currently disabled interface.

This problem was introduced by changing the way the SFP registration
works, which now can result in the sfp link down notification being
called during phylink_create().

Fixes: b5bfc21af5cb ("net: sfp: do not probe SFP module before we're attached")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c