aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorZou Wei <[email protected]>2021-05-11 15:01:35 +0800
committerWim Van Sebroeck <[email protected]>2021-06-21 08:48:59 +0200
commitc08a6b31e4917034f0ed0cb457c3bb209576f542 (patch)
treebeb9eafd7ed9335d31aa2c9ec6af662d7da8b644 /lib/string_helpers.c
parente0b101ab01c719a5a81b21ff16bbd33a868f9189 (diff)
watchdog: Fix possible use-after-free in wdt_startup()
This module'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]> 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 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions