From: Mark Andrews Date: Thu, 29 Aug 2024 12:46:12 +0000 (+0000) Subject: fix: Accessing fctx->state without holding lock X-Git-Tag: v9.21.1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ea6b16d0db28c66ff650b61aad5fd7607503af6;p=thirdparty%2Fbind9.git fix: Accessing fctx->state without holding lock Move lock earlier in the call sequence to address access without lock report. ``` 1559 /* 1560 * Caller must be holding the fctx lock. 1561 */ CID 468796: (#1 of 1): Data race condition (MISSING_LOCK) 1. missing_lock: Accessing fctx->state without holding lock fetchctx.lock. Elsewhere, fetchctx.state is written to with fetchctx.lock held 2 out of 2 times. 1562 REQUIRE(fctx->state == fetchstate_done); 1563 1564 FCTXTRACE("sendevents"); 1565 1566 LOCK(&fctx->lock); 1567 ``` Closes #4902 Merge branch '4902-accessing-fctx-state-without-holding-lock' into 'main' Closes #4902 See merge request isc-projects/bind9!9427 --- 7ea6b16d0db28c66ff650b61aad5fd7607503af6