summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorYibo Tan <lhfff@tju.edu.cn>2026-09-22 19:36:01 +0800
committerJakub Kicinski <kuba@kernel.org>2026-09-25 16:49:13 -0700
commita529f9258da5cbfe6d313651ceabda23892e5027 (patch)
treefae898c141eb679ef3e8ad384ce274a9b38a41e2 /tools/lib/python/kdoc
parente3a46dde23983e349d15948d98d204b4bc335298 (diff)
ptp: idt82p33: Stop PTP work producers before teardown
idt82p33_ptp_clock_unregister_all() cancels each channel's adjtime work before unregistering its PTP clock. An adjustment callback already in progress can schedule that work after cancellation returns. Device removal then frees the channel while its delayed work remains queued, causing a use-after-free. Mark the device as stopping under its lock before draining work. Reject new adjustment and EXTS requests, clear the EXTS polling mask, and synchronously drain the EXTS and channel adjustment work before the device storage is released. With an i2c-stub device and kprobe-controlled callback timing, three runs of the unmodified driver reported KASAN use-after-free after unbind. Three runs with this change completed without a kernel diagnostic. No physical IDT82P33 device was tested. Cc: stable+noautosel@kernel.org # untested fix to a driver init path race Signed-off-by: Yibo Tan <lhfff@tju.edu.cn> Link: https://patch.msgid.link/20260922113601.855416-1-lhfff@tju.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions