mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-10-01 22:24:55 +02:00
- lock subnet new item before insertion to please checklocks,
no modification of critical regions outside of lock region. git-svn-id: file:///svn/unbound/trunk@4497 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
- Fix unfreed locks in log and arc4random at exit of unbound.
|
||||
- unit test with valgrind
|
||||
- Fix lock race condition in dns cache dname synthesis.
|
||||
- lock subnet new item before insertion to please checklocks,
|
||||
no modification of critical regions outside of lock region.
|
||||
|
||||
1 February 2018: Wouter
|
||||
- fix unaligned structure making a false positive in checklock
|
||||
|
||||
@@ -339,6 +339,7 @@ update_cache(struct module_qstate *qstate, int id)
|
||||
return;
|
||||
}
|
||||
lru_entry = &mrep_entry->entry;
|
||||
lock_rw_wrlock(&lru_entry->lock);
|
||||
lru_entry->data = calloc(1,
|
||||
sizeof(struct subnet_msg_cache_data));
|
||||
if (!lru_entry->data) {
|
||||
@@ -374,6 +375,7 @@ update_cache(struct module_qstate *qstate, int id)
|
||||
if (acquired_lock) {
|
||||
lock_rw_unlock(&lru_entry->lock);
|
||||
} else {
|
||||
lock_rw_unlock(&lru_entry->lock);
|
||||
slabhash_insert(subnet_msg_cache, h, lru_entry, lru_entry->data,
|
||||
NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user