From 346850954c2cab28202759f1aba1419bc5c6efa4 Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Fri, 27 Sep 2024 12:48:22 +0000 Subject: [PATCH] Add a missing rcu_read_unlock() call on exit path 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 9cc27e5a75..0122432216 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -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); }