mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
[36720] Free event early (fixes race to free)
Patch contributed by yhu2 <yadi.hu@windriver.com>.
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -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
|
3909. [bug] When computing the number of elements required for a
|
||||||
acl count_acl_elements could have a short count leading
|
acl count_acl_elements could have a short count leading
|
||||||
to a assertion failure. Also zero out new acl elements
|
to a assertion failure. Also zero out new acl elements
|
||||||
|
@@ -627,6 +627,8 @@ resolver_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
UNUSED(task);
|
UNUSED(task);
|
||||||
|
|
||||||
|
isc_event_free(&event);
|
||||||
|
|
||||||
LOCK(&view->lock);
|
LOCK(&view->lock);
|
||||||
|
|
||||||
view->attributes |= DNS_VIEWATTR_RESSHUTDOWN;
|
view->attributes |= DNS_VIEWATTR_RESSHUTDOWN;
|
||||||
@@ -634,8 +636,6 @@ resolver_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
UNLOCK(&view->lock);
|
UNLOCK(&view->lock);
|
||||||
|
|
||||||
isc_event_free(&event);
|
|
||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
destroy(view);
|
destroy(view);
|
||||||
}
|
}
|
||||||
@@ -651,6 +651,8 @@ adb_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
UNUSED(task);
|
UNUSED(task);
|
||||||
|
|
||||||
|
isc_event_free(&event);
|
||||||
|
|
||||||
LOCK(&view->lock);
|
LOCK(&view->lock);
|
||||||
|
|
||||||
view->attributes |= DNS_VIEWATTR_ADBSHUTDOWN;
|
view->attributes |= DNS_VIEWATTR_ADBSHUTDOWN;
|
||||||
@@ -658,8 +660,6 @@ adb_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
UNLOCK(&view->lock);
|
UNLOCK(&view->lock);
|
||||||
|
|
||||||
isc_event_free(&event);
|
|
||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
destroy(view);
|
destroy(view);
|
||||||
}
|
}
|
||||||
@@ -675,6 +675,8 @@ req_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
UNUSED(task);
|
UNUSED(task);
|
||||||
|
|
||||||
|
isc_event_free(&event);
|
||||||
|
|
||||||
LOCK(&view->lock);
|
LOCK(&view->lock);
|
||||||
|
|
||||||
view->attributes |= DNS_VIEWATTR_REQSHUTDOWN;
|
view->attributes |= DNS_VIEWATTR_REQSHUTDOWN;
|
||||||
@@ -682,8 +684,6 @@ req_shutdown(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
UNLOCK(&view->lock);
|
UNLOCK(&view->lock);
|
||||||
|
|
||||||
isc_event_free(&event);
|
|
||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
destroy(view);
|
destroy(view);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user