diff options
| author | Myeonghun Pak <mhun512@gmail.com> | 2026-07-27 21:34:14 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-01 16:48:45 +0200 |
| commit | 4ffee1aebb0c0ffcda9faffd17834ea9b00d42cc (patch) | |
| tree | e2d829768c2b49e5275442f806563c08d2312870 /scripts/Makefile.thinlto | |
| parent | eae6460f617382044c5afe5ef202f4d8b2c099b5 (diff) | |
| download | linux-4ffee1aebb0c0ffcda9faffd17834ea9b00d42cc.tar.gz linux-4ffee1aebb0c0ffcda9faffd17834ea9b00d42cc.zip | |
usb: storage: realtek_cr: fix use-after-free on disconnect
realtek_cr_destructor() calls timer_delete() before the chip containing
the timer is freed. The timer callback may still be running and can
rearm itself, resulting in a use-after-free.
Use timer_shutdown_sync() to wait for the callback and prevent further
rearming. Do this unconditionally because ss_en may be changed after
the timer is armed.
Move timer_setup() into init_realtek_cr() so the timer is initialized
before any failure path can invoke the destructor.
Found by static analysis.
Fixes: e931830bb877 ("Realtek cr: Add autosuspend function.")
Cc: stable <stable@kernel.org>
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260727123414.44700-1-mhun512@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
