]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Annotate the other missing_lock in connection_check() (CID #1551702)
authorJames Jones <jejones3141@gmail.com>
Thu, 8 Feb 2024 21:31:33 +0000 (15:31 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 6 Mar 2024 16:59:56 +0000 (10:59 -0600)
As with CID 1551700, Coverity doesn't know that all callers of
connection_check() have locked pool->mutex, so we need to annotate
the later reference to pool->pending_window.

src/lib/server/pool.c

index 7f58b949ec0d53cd54f8d2fab5f9be2289c991f3..a2a3bf4d2eee17a3c5460f4c6233b8043adf1dba 100644 (file)
@@ -774,7 +774,10 @@ static int connection_check(fr_pool_t *pool, request_t *request)
        if (spare < pool->spare) {
                /*
                 *      Don't open too many pending connections.
+                *      Again, coverity doesn't realize all callers have the lock,
+                *      so we must annotate here as well.
                 */
+               /* coverity[missing_lock] */
                if (pool->state.pending >= pool->pending_window) goto manage_connections;
 
                /*