Merge branch '3488-prevent-adb-dump-race-v9_18-v9_16' into 'v9_16'

Lock the address entry bucket when dumping ADB namehook

See merge request isc-projects/bind9!6658
This commit is contained in:
Evan Hunt 2022-08-13 00:48:17 +00:00
commit 80604b856d

View file

@ -3675,7 +3675,13 @@ print_namehook_list(FILE *f, const char *legend, dns_adb_t *adb,
if (debug) {
fprintf(f, ";\tHook(%s) %p\n", legend, nh);
}
#ifdef __SANITIZE_THREAD__
LOCK(&adb->entrylocks[nh->entry->lock_bucket]);
#endif
dump_entry(f, adb, nh->entry, debug, now);
#ifdef __SANITIZE_THREAD__
UNLOCK(&adb->entrylocks[nh->entry->lock_bucket]);
#endif
}
}