[SRU][B / hwe][PATCH 0/2] ptp: fix general protection fault in ptp_clock_unregister()

Andrea Righi andrea.righi at canonical.com
Wed Mar 4 17:29:50 UTC 2020


BugLink: https://bugs.launchpad.net/bugs/1864754

[Impact]

Disconnecting a thunderbolt docking station on a Dell Inc. XPS 13
9360/0D4J15 can cause a general protection fault (with kernel 5.3.0-40
and above).

The bug has been introduced by this upstream commit:

  ffe3bcaf02c4 ("ptp: fix the race between the release of ptp_clock and cdev")

Reverting the commit is not a viable option, because it would
re-introduce another bug.

The fix is to do something similar to this:

  75718584cb3c64e6269109d4d54f888ac5a5fd15 ("ptp: free ptp device pin descriptors properly")

and call posix_clock_unregister() in ptp_clock_release().

NOTE: this bug is also present upstream!

In addition to that it seems that we can also trigger a kernel oops with
the igb driver if this additional upstream fix is not applied:

  94bc1e522b32c866d85b5af0ede55026b585ae73 ("igb/igc: Don't warn on fatal read failures when the device is removed")

[Test case]

Bug reporter provided the test case by physically disconnecting the
docking station. The problems can be easily reproduced.

[Fix]

Apply upstream commit:

  94bc1e522b32c866d85b5af0ede55026b585ae73 ("igb/igc: Don't warn on fatal read failures when the device is removed")

And a custom patch to call call posix_clock_unregister() from
ptp_clock_release().

[Regression potential]

About the upstream commit the regression potential is minimal. The other
custom fix seems to be pretty straightforward. We may consider to post
this upstream and wait for a better feedback from the community.

----------------------------------------------------------------
Andrea Righi (1):
      UBUNTU: SAUCE: ptp: free ptp clock properly

Lyude Paul (1):
      igb/igc: Don't warn on fatal read failures when the device is removed

 drivers/net/ethernet/intel/igb/igb_main.c | 3 ++-
 drivers/net/ethernet/intel/igc/igc_main.c | 3 ++-
 drivers/ptp/ptp_clock.c                   | 3 +--
 3 files changed, 5 insertions(+), 4 deletions(-)




More information about the kernel-team mailing list