From: Mark Andrews Date: Fri, 19 Oct 2001 00:22:26 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.2.0rc8~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c65bd9be8331881488efa41dbd4cc8b3d61c4094;p=thirdparty%2Fbind9.git pullup: 1061. [bug] If periodic cache cleaning happened to start while cleaning due to reaching the configured maximum cache size was in progress, the server could catch an assertion failure. [RT #1912] --- diff --git a/CHANGES b/CHANGES index 27f11696909..ef839634157 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +1061. [bug] If periodic cache cleaning happened to start + while cleaning due to reaching the configured + maximum cache size was in progress, the server + could catch an assertion failure. [RT #1912] + 1057. [bug] Reloading the server after adding a "file" clause to a zone statement could cause the server to crash due to a typo in change 1016. diff --git a/lib/dns/cache.c b/lib/dns/cache.c index 39127e5d1dd..e2bad8d2be9 100644 --- a/lib/dns/cache.c +++ b/lib/dns/cache.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cache.c,v 1.45 2001/07/02 20:44:30 gson Exp $ */ +/* $Id: cache.c,v 1.45.2.1 2001/10/19 00:22:26 marka Exp $ */ #include @@ -622,16 +622,10 @@ cleaning_timer_action(isc_task_t *task, isc_event_t *event) { INSIST(task == cleaner->task); INSIST(event->ev_type == ISC_TIMEREVENT_TICK); - if (cleaner->state == cleaner_s_idle) { + if (cleaner->state == cleaner_s_idle) begin_cleaning(cleaner); - isc_event_free(&event); - } else - /* - * incremental_cleaning_action() takes responsibility - * for freeing or preserving the event. - */ - incremental_cleaning_action(task, event); + isc_event_free(&event); } /* @@ -679,8 +673,7 @@ incremental_cleaning_action(isc_task_t *task, isc_event_t *event) { UNUSED(task); INSIST(task == cleaner->task); - INSIST(event->ev_type == DNS_EVENT_CACHECLEAN || - event->ev_type == ISC_TIMEREVENT_TICK); + INSIST(event->ev_type == DNS_EVENT_CACHECLEAN); if (cleaner->state == cleaner_s_done) { cleaner->state = cleaner_s_busy;