APPLIED: [PATCH v2 0/1][F] ptp: fix potential general protection fault in ptp_clock_unregister()

Seth Forshee seth.forshee at canonical.com
Thu Apr 2 18:31:12 UTC 2020


On Fri, Mar 27, 2020 at 11:07:05AM +0100, Andrea Righi wrote:
> BugLink: https://bugs.launchpad.net/bugs/1864754
> 
> v2: move pps_unregister_source() to ptp_clock_release(), instead of
>     posix_clock_unregister(), that would just introduce a resource leak
> 
> [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 we would
> re-introduce another bug.
> 
> The proper fix is to do something similar to this:
> 
>   75718584cb3c64e6269109d4d54f888ac5a5fd15 "ptp: free ptp device pin descriptors properly"
> 
> and call pps_unregister_source() in ptp_clock_release(). NOTE: this bug
> is also present upstream.
> 
> [Test case]
> 
> Bug reported provided the test case by physically disconnecting the
> docking station. The problems can be easily reproduced and it doesn't
> seem to happen anymore with the fix applied.
> 
> [Fix]
> 
> Call call pps_unregister_source() from ptp_clock_release() instead of
> ptp_clock_unregister().
> 
> [Regression potential]
> 
> Minimal regression potential, the change is limited to the ptp clock
> unregistering code path.

This was applied previously, noting it here for the record.



More information about the kernel-team mailing list