From 4123d59fbc3fc5139b5e43370238ca13a290e07c 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. --- lib/dns/dispatch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index e4fd46bd30..5a08a06577 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -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); }