This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 1a79005732 HostDB: cancelled action check when triggering pending 
(#9742)
1a79005732 is described below

commit 1a79005732491d9d3b4d5b0191a13cf170b1d923
Author: Brian Neradt <[email protected]>
AuthorDate: Thu Jun 1 17:21:32 2023 -0500

    HostDB: cancelled action check when triggering pending (#9742)
    
    While triggering pending DNS actions in HostDB, this adds a check that
    the action is not cancelled before trying to grab the Continuation's
    lock, which would otherwise be cleared resulting in a null dereference.
---
 iocore/hostdb/HostDB.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 3889abdd29..a09b160130 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1394,7 +1394,9 @@ HostDBContinuation::remove_and_trigger_pending_dns()
       if (hash.hash == c->hash.hash) {
         Dbg(dbg_ctl_hostdb, "dequeuing additional request");
         q.remove(c);
-        qq.enqueue(c);
+        if (!c->action.cancelled) {
+          qq.enqueue(c);
+        }
       }
       c = n;
     }

Reply via email to