mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
Input: hp_sdc - shut down kicker timer on module exit
hp_sdc_kicker() rearms hp_sdc.kicker with mod_timer() after scheduling the
tasklet. The module exit path uses timer_delete_sync(). That waits for a
callback already running but can still leave the timer rearmed.
A callback can therefore leave the timer pending while hp_sdc_exit() tears
down the driver, allowing timer activity to access dismantled driver state.
Use timer_shutdown_sync() for final teardown. It waits for a running
callback and prevents rearming after module exit begins.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patch.msgid.link/20260902154004.3595416-1-runyu.xiao@seu.edu.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
971fa7ea86
commit
309731e959
|
|
@ -981,7 +981,7 @@ static void hp_sdc_exit(void)
|
|||
free_irq(hp_sdc.irq, &hp_sdc);
|
||||
write_unlock_irq(&hp_sdc.lock);
|
||||
|
||||
timer_delete_sync(&hp_sdc.kicker);
|
||||
timer_shutdown_sync(&hp_sdc.kicker);
|
||||
|
||||
tasklet_kill(&hp_sdc.task);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user