summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorDanish Khateeb <danishkhateeb03@gmail.com>2026-09-29 07:49:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-01 15:45:00 +0200
commit3e75af9f41c7509884d0955245dec2b791287e8c (patch)
tree8e85815a1251763a88e7e52c8a3d3828c75d6c74 /tools/lib/python/kdoc/python_version.py
parent4e8063cae337cb7328e6856235cf4de5d165516e (diff)
pps: generators: stop the generator on unregister
Both generator drivers stop their timer and then call pps_gen_unregister_source(): pps_gen_tio_remove() cancels its hrtimer and disables the TIO, and pps_gen_dummy_exit() deletes its timer. But /dev/pps-genN and the sysfs "enable" attribute are still there until the unregister, and a PPS_GEN_SETENABLE or a write to "enable" in between starts the timer again. Nothing stops it after that: TIO's hrtimer keeps running in the devm memory freed by the unbind, and the dummy's timer is left in the unloaded module. The drivers can't avoid this by unregistering first, as TIO's timer callback uses pps_gen, which the unregister may free. Stop the generator in pps_gen_unregister_cdev() instead, under info_lock after the device and its sysfs files are gone, when nothing can enable it again. pps_gen_unregister_source() then also does what its kernel-doc says: "it disables the generator so no pulses are generated anymore". Fixes: 86b525bed275 ("drivers pps: add PPS generators support") Cc: stable@vger.kernel.org Suggested-by: Rodolfo Giometti <giometti@enneenne.com> Assisted-by: LLM Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com> Acked-by: Rodolfo Giometti <giometti@enneenne.com> Link: https://patch.msgid.link/20260929124937.51114-4-danishkhateeb03@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions