mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 09:20:01 -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.
This commit is contained in:
parent
ea408e3c3d
commit
a2bd833909
1 changed files with 2 additions and 1 deletions
|
|
@ -5626,7 +5626,6 @@ validated(void *arg) {
|
|||
addrinfo = valarg->addrinfo;
|
||||
|
||||
message = val->message;
|
||||
fctx->vresult = val->result;
|
||||
|
||||
FCTXTRACE("received validation completion event");
|
||||
|
||||
|
|
@ -5634,6 +5633,8 @@ validated(void *arg) {
|
|||
|
||||
LOCK(&fctx->lock);
|
||||
|
||||
fctx->vresult = val->result;
|
||||
|
||||
ISC_LIST_UNLINK(fctx->validators, val, link);
|
||||
|
||||
if (SHUTTINGDOWN(fctx)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue