]> 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)
committerAram Sargsyan <aram@isc.org>
Fri, 27 Sep 2024 13:48:33 +0000 (13:48 +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.

lib/dns/dispatch.c

index e4fd46bd308a6ecd29360522550f4d5cfd7b6e1a..5a08a0657708d46feb90a7483d4c531ff4121cb0 100644 (file)
@@ -1494,6 +1494,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);
        }