Compare commits

...

1 Commits

Author SHA1 Message Date
Ondřej Surý
1c92526e48 Revert "Merge branch '84-destroy-task-first-when-destroying-rpzs' into 'master'"
This reverts merge request !944
2018-10-30 09:17:11 -04:00
3 changed files with 4 additions and 12 deletions

View File

@@ -1,6 +1,3 @@
5073. [bug] Destroy a task first when destroying rpzs and catzs.
[GL #84]
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
behavior for auto-reallocated buffers. [GL #644]

View File

@@ -795,7 +795,7 @@ dns_catz_catzs_detach(dns_catz_zones_t **catzsp) {
*catzsp = NULL;
if (isc_refcount_decrement(&catzs->refs) == 1) {
isc_task_destroy(&catzs->updater);
isc_refcount_destroy(&catzs->refs);
DESTROYLOCK(&catzs->lock);
if (catzs->zones != NULL) {
isc_ht_iter_t *iter = NULL;
@@ -815,7 +815,7 @@ dns_catz_catzs_detach(dns_catz_zones_t **catzsp) {
INSIST(isc_ht_count(catzs->zones) == 0);
isc_ht_destroy(&catzs->zones);
}
isc_refcount_destroy(&catzs->refs);
isc_task_destroy(&catzs->updater);
isc_mem_putanddetach(&catzs->mctx, catzs, sizeof(*catzs));
}
}

View File

@@ -2148,12 +2148,7 @@ dns_rpz_detach_rpzs(dns_rpz_zones_t **rpzsp) {
*rpzsp = NULL;
if (isc_refcount_decrement(&rpzs->refs) == 1) {
/*
* Destroy the task first, so that nothing runs
* in the background that might race with us.
*/
isc_task_destroy(&rpzs->updater);
isc_refcount_destroy(&rpzs->refs);
/*
* Forget the last of view's rpz machinery after
* the last reference.
@@ -2183,7 +2178,7 @@ dns_rpz_detach_rpzs(dns_rpz_zones_t **rpzsp) {
}
DESTROYLOCK(&rpzs->maint_lock);
isc_rwlock_destroy(&rpzs->search_lock);
isc_refcount_destroy(&rpzs->refs);
isc_task_destroy(&rpzs->updater);
isc_mem_putanddetach(&rpzs->mctx, rpzs, sizeof(*rpzs));
}
}