Skip to content
Commit 33bd2fed authored by Martin Jäger's avatar Martin Jäger Committed by Johan Hedberg
Browse files

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: default avatarMartin Jäger <martin@libre.solar>
parent 474aa963
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment