BIND 10 trac2202, updated. 8bd4cd42e061d49d098cb1387b3614226a161f6d [2202] Don't release the lock until rendered
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Oct 1 13:45:42 UTC 2012
The branch, trac2202 has been updated
via 8bd4cd42e061d49d098cb1387b3614226a161f6d (commit)
from dd5bb15644a8e6d0df49d93ee8e982d2d0d463ea (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8bd4cd42e061d49d098cb1387b3614226a161f6d
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Oct 1 15:44:02 2012 +0200
[2202] Don't release the lock until rendered
Since the message could contain some data from inside of the locked
lists/data sources, we need to keep the lock until we render it.
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/auth_srv.cc | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc
index 9f6becf..04dc299 100644
--- a/src/bin/auth/auth_srv.cc
+++ b/src/bin/auth/auth_srv.cc
@@ -629,13 +629,13 @@ AuthSrvImpl::processNormalQuery(const IOMessage& io_message, Message& message,
local_edns->setUDPSize(AuthSrvImpl::DEFAULT_LOCAL_UDPSIZE);
message.setEDNS(local_edns);
}
+ // Lock the client lists and keep them under the lock until the processing
+ // and rendering is done (this is the same mutex as from
+ // AuthSrv::getClientListMutex()).
+ isc::util::thread::Mutex::Locker locker(mutex_);
try {
const ConstQuestionPtr question = *message.beginQuestion();
- // Lock the client lists and keep them under the lock until
- // the processing is done (this is the same mutex as from
- // AuthSrv::getClientListMutex()).
- isc::util::thread::Mutex::Locker locker(mutex_);
const boost::shared_ptr<datasrc::ClientList>
list(getClientList(question->getClass()));
if (list) {
@@ -664,6 +664,8 @@ AuthSrvImpl::processNormalQuery(const IOMessage& io_message, Message& message,
LOG_DEBUG(auth_logger, DBG_AUTH_MESSAGES, AUTH_SEND_NORMAL_RESPONSE)
.arg(renderer_.getLength()).arg(message);
return (true);
+ // The message can contain some data from the locked resource. But outside
+ // this method, we touch only the RCode of it, so it should be safe.
}
bool
More information about the bind10-changes
mailing list