diff options
author | Zou Wei <[email protected]> | 2021-05-12 14:57:56 +0800 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2021-06-21 08:49:03 +0200 |
commit | d0212f095ab56672f6f36aabc605bda205e1e0bf (patch) | |
tree | b8e7ed858241af9a664bf25a72751ce7f7bbaf4e /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 90b7c141132244e8e49a34a4c1e445cce33e07f4 (diff) |
watchdog: Fix possible use-after-free by calling del_timer_sync()
This driver's remove path calls del_timer(). However, that function
does not wait until the timer handler finishes. This means that the
timer handler may still be running after the driver's remove function
has finished, which would result in a use-after-free.
Fix by calling del_timer_sync(), which makes sure the timer handler
has finished, and unable to re-schedule itself.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Acked-by: Vladimir Zapolskiy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions