Commit 1766a5d9 authored by Evan Hunt's avatar Evan Hunt
Browse files

Merge branch '982-filter-aaaa-race' into 'master'

Resolve "filter-aaaa crash in 9.14.0"

Closes #982

See merge request isc-projects/bind9!1861
parents 2c85466c ce8ad08a
5219. [bug] Fixed a race in the filter-aaaa plugin that could
trigger a crash when returning an instance object
to the memory pool. [GL #982]
5218. [bug] Conditionally include <dlfcn.h>. [GL #995]
 
5217. [bug] Restore key id calculation for RSAMD5. [GL #996]
......
......@@ -83,6 +83,7 @@ typedef struct filter_instance {
* Memory pool for use with persistent data.
*/
isc_mempool_t *datapool;
isc_mutex_t plock;
/*
* Hash table associating a client object with its persistent data.
......@@ -388,6 +389,8 @@ plugin_register(const char *parameters,
*/
isc_mempool_setfillcount(inst->datapool, 1024);
isc_mempool_setfreemax(inst->datapool, UINT_MAX);
isc_mutex_init(&inst->plock);
isc_mempool_associatelock(inst->datapool, &inst->plock);
/*
* Set hook points in the view's hooktable.
......@@ -446,6 +449,7 @@ plugin_destroy(void **instp) {
}
if (inst->datapool != NULL) {
isc_mempool_destroy(&inst->datapool);
isc_mutex_destroy(&inst->plock);
}
if (inst->aaaa_acl != NULL) {
dns_acl_detach(&inst->aaaa_acl);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment