mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
2330. [bug] Remove potential race condition when handling
over memory events. [RT #17572] WARNING: API CHANGE: over memory callback function now needs to call isc_mem_waterack(). See <isc/mem.h> for details.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cache.c,v 1.76 2007/10/19 17:15:53 explorer Exp $ */
|
||||
/* $Id: cache.c,v 1.77 2008/02/07 02:41:26 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -708,8 +708,11 @@ water(void *arg, int mark) {
|
||||
|
||||
LOCK(&cache->cleaner.lock);
|
||||
|
||||
dns_db_overmem(cache->db, overmem);
|
||||
cache->cleaner.overmem = overmem;
|
||||
if (overmem != cache->cleaner.overmem) {
|
||||
dns_db_overmem(cache->db, overmem);
|
||||
cache->cleaner.overmem = overmem;
|
||||
isc_mem_waterack(cache->mctx, mark);
|
||||
}
|
||||
|
||||
UNLOCK(&cache->cleaner.lock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user