[SRU] [F/G/Unstable/OEM-5.6/OEM-5.10] [PATCH 0/1] Fix reading speed and duplex sysfs on igc device
Kai-Heng Feng
kai.heng.feng at canonical.com
Fri Dec 4 16:10:02 UTC 2020
BugLink: https://bugs.launchpad.net/bugs/1906851
[Impact]
Reading speed and duplex sysfs on igc device when it's runtime suspended
will make it stops working. Even kernel panic sometimes.
[Fix]
If igc device is runtime suspended, it means link isn't up, so we can
just report speed as -1 and duplex as unknown.
[Test]
$ cat /sys/class/net/*/speed
Then we'll see:
[ 123.449883] igc 0000:03:00.0 enp3s0: PCIe link lost, device now detached
[ 123.450052] BUG: kernel NULL pointer dereference, address: 0000000000000008
With the fix applied,
$ cat /sys/class/net/*/speed
-1
[Where problems could occur]
Not at all. Reading register when device is runtime suspended is just
wrong. The fix prevents it from happening.
Kai-Heng Feng (1):
igc: Report speed and duplex as unknown when device is runtime
suspended
drivers/net/ethernet/intel/igc/igc_ethtool.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.29.2
More information about the kernel-team
mailing list