add an isc_loop_rcu_barrier() for memory cleanup to finish

when adding data to the cache while over memory limits, add an
RCU barrier to ensure that memory is cleaned right away.
This commit is contained in:
Ondřej Surý
2024-06-07 17:24:20 -07:00
committed by Evan Hunt
parent fb39babdff
commit 929fb51612
+5
View File
@@ -3459,6 +3459,11 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node,
dns_qpread_destroy(qpdb->tree, &modctx.qpr);
}
if (cache_is_overmem) {
/* Trigger memory cleaning */
isc_loop_rcu_barrier(isc_loop());
}
return (result);
}