]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Wait for memory reclamation to finish in named-checkconf
authorOndřej Surý <ondrej@isc.org>
Fri, 21 Mar 2025 08:46:49 +0000 (09:46 +0100)
committerOndřej Surý <ondrej@isc.org>
Tue, 25 Mar 2025 10:00:00 +0000 (11:00 +0100)
When named-checkzone loads the zone to the QP database, the delayed
memory reclamation could cause an assertion check on exit.  Add RCU
barrier to wait for the memory reclamation to complete.

bin/check/named-checkconf.c

index 0b2f847adaa44f23914c9ef43435ca20dd4b5854..ce0a9805319e1f2c2df9e9df157e24cd4e6c3e74 100644 (file)
@@ -761,6 +761,11 @@ cleanup:
                dst_lib_destroy();
        }
 
+       /*
+        * Wait for memory reclamation in dns_qp to finish.
+        */
+       rcu_barrier();
+
        if (logc != NULL) {
                isc_log_destroy(&logc);
        }