summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Kim <james010kim@gmail.com>2026-05-03 13:11:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-05-23 14:47:33 +0300
commitbbf003b7794d6ad6f939fdd29f1f1bde8ac554c1 (patch)
tree2fb72028c3cbbb32ffef52520624dbd2514873b5 /scripts
parent314e01d7f67aaa72617aa5e88e4fea09373bd04d (diff)
downloadlinux-bbf003b7794d6ad6f939fdd29f1f1bde8ac554c1.tar.xz
char: tlclk: fix use-after-free in tlclk_cleanup()
This patch improves the module cleanup process in the tlclk driver to prevent potential use-after-free and race conditions. Currently, the file_operations structure does not specify the .owner field, which could allow the module to be unloaded while user-space processes are still interacting with the device. Additionally, the tlclk_cleanup() function frees the alarm_events memory before ensuring that blocked processes in the waitqueue are fully awakened and that the switchover_timer has completed. To address these cases, this patch: - Sets '.owner = THIS_MODULE' in tlclk_fops to safely defer module unloading while the device is in use. - Updates tlclk_cleanup() to explicitly wake up all blocked readers (wake_up_all), properly release hardware I/O regions, and safely delete the timer (timer_delete_sync) prior to freeing memory. Fixes: 1a80ba882730 ("[PATCH] Telecom Clock Driver for MPCBL0010 ATCA computer blade") Signed-off-by: James Kim <james010kim@gmail.com> Link: https://patch.msgid.link/20260503101131.64219-1-james010kim@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions