Gabriele Monaco <[email protected]> writes: > Hybrid Automata monitors hook into the DA implementation when doing > da_monitor_reset(). This function is called both on initialisation and > teardown, HA monitors try to cancel a timer only when it's initialised > relying on the da_mon->monitoring flag. This flag could however be > corrupted during initialisation. This happens for instance on per-task > monitors that share the same storage with different type of monitors > like LTL or in case of races during a previous teardown. > > Stop relying on the monitoring flag during initialisation, assume that > can have any value, so use a separate da_reset_state() skiping timer > cancellation. > New monitors (e.g. new tasks) are always zero-initialised so it is safe > to rely on the monitoring flag for those. > > Reported-by: Wen Yang <[email protected]> > Closes: > https://lore.kernel.org/lkml/d02c656aada7d071f083460a5c9a454363669b61.1778522945.git.wen.y...@linux.dev > Suggested-by: Nam Cao <[email protected]> > Fixes: f5587d1b6ec9 ("rv: Add Hybrid Automata monitor type") > Reviewed-by: Wen Yang <[email protected]> > Signed-off-by: Gabriele Monaco <[email protected]>
Reviewed-by: Nam Cao <[email protected]>
