mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Merge branch '4328-tasn-error-in-isc_hashmap_iter_create' into 'main'
Resolve "ThreadSanitizer: data race in dns_tsigkeyring_dump" Closes #4328 See merge request isc-projects/bind9!8473
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
||||
6281. [bug] Fix a data race in dns_tsigkeyring_dump(). [GL #4328]
|
||||
|
||||
6280. [bug] Fix missing newlines in the output of "rndc nta -dump".
|
||||
[GL !8454]
|
||||
|
||||
|
@@ -469,6 +469,7 @@ dns_tsigkeyring_dump(dns_tsigkeyring_t *ring, FILE *fp) {
|
||||
|
||||
REQUIRE(VALID_TSIGKEYRING(ring));
|
||||
|
||||
RWLOCK(&ring->lock, isc_rwlocktype_read);
|
||||
isc_hashmap_iter_create(ring->keys, &it);
|
||||
for (result = isc_hashmap_iter_first(it); result == ISC_R_SUCCESS;
|
||||
result = isc_hashmap_iter_next(it))
|
||||
@@ -482,6 +483,7 @@ dns_tsigkeyring_dump(dns_tsigkeyring_t *ring, FILE *fp) {
|
||||
}
|
||||
}
|
||||
isc_hashmap_iter_destroy(&it);
|
||||
RWUNLOCK(&ring->lock, isc_rwlocktype_read);
|
||||
|
||||
return (found ? ISC_R_SUCCESS : ISC_R_NOTFOUND);
|
||||
}
|
||||
|
Reference in New Issue
Block a user