]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4044. [bug] Change 3955 was not complete resulting is a assertion
authorMark Andrews <marka@isc.org>
Wed, 21 Jan 2015 23:38:40 +0000 (10:38 +1100)
committerMark Andrews <marka@isc.org>
Wed, 21 Jan 2015 23:39:18 +0000 (10:39 +1100)
                        failure is the timing was just right. [RT #38352]

(cherry picked from commit 17dc146c7c2399e7bd64e776775535b9484ad1d5)

CHANGES
lib/isc/ratelimiter.c

diff --git a/CHANGES b/CHANGES
index 56a2d3bf1edf94f5952bfab2f63ba7bc6945af92..0320865cb80b02256a7080fbcf6cd26c5f3075a7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,5 @@
-4042.  [bug]           zone.c:iszonesecure was being called too late.
-                       [RT #38371]
+4044.  [bug]           Change 3955 was not complete resulting is a assertion
+                       failure is the timing was just right. [RT #38352]
 
 4039.  [cleanup]       Cleaned up warnings from gcc -Wshadow. [RT #37381]
 
index e702e599ef6d801a5dd5e16ff1dec330eb42f568..463319e11def75198afb9d98e11a055852484c13 100644 (file)
@@ -154,8 +154,8 @@ isc_ratelimiter_enqueue(isc_ratelimiter_t *rl, isc_task_t *task,
        if (rl->state == isc_ratelimiter_ratelimited ||
            rl->state == isc_ratelimiter_stalled) {
                ev->ev_sender = task;
-               ISC_LIST_APPEND(rl->pending, ev, ev_link);
                *eventp = NULL;
+               ISC_LIST_APPEND(rl->pending, ev, ev_link);
        } else if (rl->state == isc_ratelimiter_idle) {
                result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
                                         &rl->interval, ISC_FALSE);
@@ -181,9 +181,10 @@ isc_ratelimiter_dequeue(isc_ratelimiter_t *rl, isc_event_t *event) {
        REQUIRE(event != NULL);
 
        LOCK(&rl->lock);
-       if (ISC_LINK_LINKED(event, ev_link))
+       if (ISC_LINK_LINKED(event, ev_link)) {
                ISC_LIST_UNLINK(rl->pending, event, ev_link);
-       else
+               event->ev_sender = NULL;
+       } else
                result = ISC_R_NOTFOUND;
        UNLOCK(&rl->lock);
        return (result);