diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-09-18 16:48:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-18 20:14:19 -0700 |
commit | 126d6848ef13958e1cb959e96c21d19bc498ade9 (patch) | |
tree | b99118cda68e3706f3e04970f046160f4e5b8ada /net/l3mdev | |
parent | 774268f3e51b53ed432a1ec516574fd5ba469398 (diff) |
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: ce0aa27ff3f6 ("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>
Diffstat (limited to 'net/l3mdev')
0 files changed, 0 insertions, 0 deletions