mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 13:50:00 -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
31cbfc9fb3
commit
993002cebf
1 changed files with 1 additions and 1 deletions
|
|
@ -5335,9 +5335,9 @@ validated(void *arg) {
|
|||
addrinfo = valarg->addrinfo;
|
||||
|
||||
message = val->message;
|
||||
fctx->vresult = val->result;
|
||||
|
||||
LOCK(&fctx->lock);
|
||||
fctx->vresult = val->result;
|
||||
ISC_LIST_UNLINK(fctx->validators, val, link);
|
||||
fctx->validator = NULL;
|
||||
UNLOCK(&fctx->lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue