2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

[36720] Free event early (fixes race to free)

Patch contributed by yhu2 <yadi.hu@windriver.com>.
This commit is contained in:
Mukund Sivaraman
2014-08-05 16:58:23 +05:30
parent fffcc1b135
commit a338c2d947
2 changed files with 8 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
3910. [bug] Fix races to free event during shutdown. [RT#36720]
3909. [bug] When computing the number of elements required for a
acl count_acl_elements could have a short count leading
to a assertion failure. Also zero out new acl elements

View File

@@ -627,6 +627,8 @@ resolver_shutdown(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
isc_event_free(&event);
LOCK(&view->lock);
view->attributes |= DNS_VIEWATTR_RESSHUTDOWN;
@@ -634,8 +636,6 @@ resolver_shutdown(isc_task_t *task, isc_event_t *event) {
UNLOCK(&view->lock);
isc_event_free(&event);
if (done)
destroy(view);
}
@@ -651,6 +651,8 @@ adb_shutdown(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
isc_event_free(&event);
LOCK(&view->lock);
view->attributes |= DNS_VIEWATTR_ADBSHUTDOWN;
@@ -658,8 +660,6 @@ adb_shutdown(isc_task_t *task, isc_event_t *event) {
UNLOCK(&view->lock);
isc_event_free(&event);
if (done)
destroy(view);
}
@@ -675,6 +675,8 @@ req_shutdown(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
isc_event_free(&event);
LOCK(&view->lock);
view->attributes |= DNS_VIEWATTR_REQSHUTDOWN;
@@ -682,8 +684,6 @@ req_shutdown(isc_task_t *task, isc_event_t *event) {
UNLOCK(&view->lock);
isc_event_free(&event);
if (done)
destroy(view);
}