From c521b199e4b757cd333e99dd1a3f1753543a8e19 Mon Sep 17 00:00:00 2001 From: Fei Deng Date: Wed, 21 Aug 2019 14:20:24 -0500 Subject: [PATCH] grab lock before invoking hook --- iocore/net/SSLNetVConnection.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc index 112cca4e43f..477e6778105 100644 --- a/iocore/net/SSLNetVConnection.cc +++ b/iocore/net/SSLNetVConnection.cc @@ -1747,6 +1747,7 @@ SSLNetVConnection::callHooks(TSEvent eventId) } if (curHook != nullptr) { + SCOPED_MUTEX_LOCK(lock, curHook->m_cont->mutex, this_ethread()); curHook->invoke(eventId, this); reenabled = (this->sslHandshakeHookState != HANDSHAKE_HOOKS_CERT_INVOKE && this->sslHandshakeHookState != HANDSHAKE_HOOKS_PRE_INVOKE &&