aboutsummaryrefslogtreecommitdiffstats
path: root/vlib/.gitignore
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2023-04-04 19:27:55 +0000
committerDave Wallace <dwallacelf@gmail.com>2023-09-13 17:02:00 +0000
commit0dfaadec8cb6a512f3ce81946b9d39aa8cb1d9f5 (patch)
tree1f4c8dae87c379e07a5ce817f7914675186cb0cb /vlib/.gitignore
parent3be288f0d9214ed25303bb620b07b09e0a26f1e2 (diff)
vlib: reset stop_timer_handle on expired processesstable/2302
Type: fix The main loop populates a vector of suspended process nodes to dispatch by calling TW (tw_timer_expire_timers_vec), which identifies expired timers and appends the user handle for each one to the vector. Subsequently, the vector is iterated and the process node corresponding to each handle is dispatched. The vast majority of the time, the process node will end up suspending itself again to wait for a new timer or event. Given a process node A whose timer has expired, between the point when the timer expired and the point when A is dispatched and suspends itself again, its stop_timer_handle contains a stale value. If another process node B is dispatched before A is dispatched, it may end up using the timer ID that A formerly used. If another process node C is dispatched after B and before A and calls vlib_process_signal_event() to signal A, the timer started by B can be deleted by vlib_process_signal_event_helper(). After getting the vector of process node IDs for expired timers, reset the stop_timer_handle on each of those nodes. Change-Id: I266da438e76e1fc356016da0b9b4941efac1c28a Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit 9aa4ac55b0a205e333e567f87c3cc9379af2363c)
Diffstat (limited to 'vlib/.gitignore')
0 files changed, 0 insertions, 0 deletions