From 19aff9289e7294c8f77ac33dd1b6713fa3537595 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 31 May 2013 17:31:27 -0700 Subject: [PATCH] [v9_8] possible race in acache.c 3580. [bug] Addressed a possible race in acache.c [RT #33602] (cherry picked from commit 5183f9d9daa139cbf000c12709877f62e79dfb14) --- CHANGES | 2 ++ lib/dns/acache.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d08028d893..0afc3782ad 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3580. [bug] Addressed a possible race in acache.c [RT #33602] + 3579. [maint] Updates to PKCS#11 openssl patches, supporting versions 0.9.8y, 1.0.0k, 1.0.1e [RT #33463] diff --git a/lib/dns/acache.c b/lib/dns/acache.c index 863df35535..92949c7534 100644 --- a/lib/dns/acache.c +++ b/lib/dns/acache.c @@ -1669,13 +1669,14 @@ dns_acache_cancelentry(dns_acacheentry_t *entry) { REQUIRE(DNS_ACACHEENTRY_VALID(entry)); acache = entry->acache; - callback_active = ISC_TF(entry->cbarg != NULL); INSIST(DNS_ACACHE_VALID(entry->acache)); LOCK(&acache->lock); ACACHE_LOCK(&acache->entrylocks[entry->locknum], isc_rwlocktype_write); + callback_active = ISC_TF(entry->cbarg != NULL); + /* * Release dependencies stored in this entry as much as possible. * The main link cannot be released, since the acache object has