Bugzilla – Bug 1201
missing unlock in answer_from_cache() (?)
Last modified: 2017-01-06 16:51:40 CET
Just from code inspection, but I suspect the following exit code paths
from daemon/worker.c:answer_from_cache lack necessary unlocking of mutex.
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep,
LDNS_RCODE_SERVFAIL, edns, worker->scratchpad))
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, rep,
(int)(flags&LDNS_RCODE_MASK), edns, worker->scratchpad))
I suspect it should either call rrset_array_unlock_touch() before
return or go to 'bail_out' instead of return.
(the inplace_cb_reply_xxx functions don't seem to unlock the rrset
This is about svn trunk rev 3982.
That is very well spotted. Thank you for the report.
I have made it goto the bail_out; that should be exactly fine. Those routines couldn't return false before (well, before people implement EDNS options).
Best regards, Wouter