Files
bind9/lib/isc
Aram Sargsyan 0a48252b53 Fix a data race in isc_task_purgeevent()
When isc_task_purgeevent() is called for and 'event', the event, in
the meanwhile, could in theory get processed, unlinked, and freed.
So when the function then operates on the 'event', it causes a
segmentation fault.

The only place where isc_task_purgeevent() is called is from
timer_purge().

In order to resolve the data race, call isc_task_purgeevent() inside
the 'timer->lock' locked block, so that timerevent_destroy() won't
be able to destroy the event if it was processed in the meanwhile,
before isc_task_purgeevent() had a chance to purge it.

In order to be able to do that, move the responsibility of calling
isc_event_free() (upon a successful purge) out from the
isc_task_purgeevent() function to its caller instead, so that it can
be called outside of the timer->lock locked block.
2024-05-17 12:08:27 +00:00
..
2022-11-29 09:14:07 +01:00
2022-10-17 16:00:26 +01:00
2022-11-29 09:14:07 +01:00
2022-11-29 09:14:07 +01:00
2022-11-29 09:14:07 +01:00
2023-02-09 10:07:39 -08:00
2022-10-17 16:00:26 +01:00
2023-01-09 14:23:26 -08:00
2022-11-29 09:14:07 +01:00
2022-10-17 16:00:26 +01:00
2023-09-01 14:03:49 +10:00
2022-11-29 09:14:07 +01:00