mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-25 08:07:12 -04:00
The loop in shutdown_listener() assumes that the reference count for every controlconnection_t object on the listener->connections linked list will drop down to zero after the conn_shutdown() call in the loop's body. However, when the timing is just right, some netmgr callbacks for a given control connection may still be awaiting processing by the same event loop that executes shutdown_listener() when the latter is run. Since these netmgr callbacks must be run in order for the reference count for the relevant controlconnection_t objects to drop to zero, when the scenario described above happens, shutdown_listener() runs into an infinite loop due to one of the controlconnection_t objects on the listener->connections linked list never going away from the head of that list. Fix by safely iterating through the listener->connections list and initiating shutdown for all controlconnection_t objects found. This allows any pending netmgr callbacks to be run by the same event loop in due course, i.e. after shutdown_listener() returns. |
||
|---|---|---|
| .. | ||
| include | ||
| .gitignore | ||
| bind9.xsl | ||
| builtin.c | ||
| config.c | ||
| control.c | ||
| controlconf.c | ||
| dlz_dlopen_driver.c | ||
| fuzz.c | ||
| geoip.c | ||
| log.c | ||
| logconf.c | ||
| main.c | ||
| Makefile.am | ||
| named.conf.rst | ||
| named.rst | ||
| os.c | ||
| server.c | ||
| statschannel.c | ||
| tkeyconf.c | ||
| transportconf.c | ||
| tsigconf.c | ||
| xsl_p.h | ||
| zoneconf.c | ||