mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 07:22:08 -04:00
Fix data race on fctx->vresult in validated()
Move the write to fctx->vresult after LOCK(&fctx->lock). The field was
being set before acquiring the lock, but dns_resolver_logfetch() reads
it under the same lock from another thread.
(cherry picked from commit a2bd833909)
This commit is contained in:
parent
2dd5b2b90e
commit
1a5f560387
1 changed files with 1 additions and 0 deletions
|
|
@ -5662,6 +5662,7 @@ validated(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
bucketnum = fctx->bucketnum;
|
||||
LOCK(&res->buckets[bucketnum].lock);
|
||||
fctx->vresult = vevent->result;
|
||||
ISC_LIST_UNLINK(fctx->validators, vevent->validator, link);
|
||||
fctx->validator = NULL;
|
||||
UNLOCK(&res->buckets[bucketnum].lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue