zephyr/subsys/task_wdt
Martin Jäger 33bd2fed08 task_wdt: fix race condition for task_wdt_add function
The task_wdt_add function changes the reload_period of the channel to a
non-null value, which indicates that the channel is used. If the
function is interrupted by a task_wdt_trigger running in ISR context
before adding of the new channel has finished, the next timeout will be
scheduled based on inconsistent channel data.

Using a spinlock avoids such data races.

Fixes #61004

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-10-09 16:10:00 +03:00
..
CMakeLists.txt
Kconfig
task_wdt.c task_wdt: fix race condition for task_wdt_add function 2023-10-09 16:10:00 +03:00