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
a2bd8339095c99b4f0faea0f1bc39128c048c3aa)
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);