]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a missing rcu_read_unlock() call on exit path
authorAram Sargsyan <aram@isc.org>
Fri, 27 Sep 2024 12:48:22 +0000 (12:48 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Fri, 27 Sep 2024 13:53:31 +0000 (13:53 +0000)
An exit path in the dns_dispatch_add() function fails to get out of
the RCU critical section when returning early. Add the missing
rcu_read_unlock() call.

(cherry picked from commit 4123d59fbc3fc5139b5e43370238ca13a290e07c)

lib/dns/dispatch.c

index 9cc27e5a752daec983fbc81596ab027d3c5d2828..01224322169a100b6c41195a269dc70d654dc0c5 100644 (file)
@@ -1496,6 +1496,7 @@ dns_dispatch_add(dns_dispatch_t *disp, isc_loop_t *loop,
 fail:
        if (result != ISC_R_SUCCESS) {
                isc_mem_put(disp->mctx, resp, sizeof(*resp));
+               rcu_read_unlock();
                return (result);
        }