mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
[9.18] fix: dev: 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. Backport of MR !11717 Merge branch 'backport-ondrej/fix-data-race-on-fctx-result-in-validated-9.18' into 'bind-9.18' See merge request isc-projects/bind9!11722
This commit is contained in:
commit
5b7c54ae01
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