mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-18 18:18:00 -05:00
Add rcu_barrier() to isc__log_shutdown()
There is a data race when QP is reclaiming chunks on the call_rcu threads and it tries to log the number of reclaimed chunks while the server is shuttingdown. Workaround this by adding rcu_barrier() before shuttingdown the global log context.
This commit is contained in:
parent
f7e5c1db38
commit
f2e107508a
1 changed files with 8 additions and 0 deletions
|
|
@ -1573,6 +1573,14 @@ isc__log_initialize(void) {
|
|||
|
||||
void
|
||||
isc__log_shutdown(void) {
|
||||
/*
|
||||
* There is a data race when the QP database reclaims chunks on the
|
||||
* call_rcu threads and tries to log the number of reclaimed chunks
|
||||
* while the server is shutting down. Work around this by adding
|
||||
* an rcu_barrier() before shutting down the global logging context.
|
||||
*/
|
||||
rcu_barrier();
|
||||
|
||||
REQUIRE(VALID_CONTEXT(isc__lctx));
|
||||
|
||||
isc_mem_t *mctx = isc__lctx->mctx;
|
||||
|
|
|
|||
Loading…
Reference in a new issue