double-attach when prefetching
@jtatuya pointed out in a comment on #2122 (closed) that there may be an issue with a handle being attached when non-NULL:
It's just based on code inspection so I'd apologize in advance if I'm mistaken. As a result of this change,
fetchhandle
structure member was introduced inns_client
and it can be passed toisc_nmhandle_attach
from these three functions:
- ns_query_recurse
- query_rpzfetch
- query_prefetch
Is this safe? If I understand the implementation correctly,
ns_query_recurse
can be called while prefetching is taking place, so I suspect it's possible thatisc_nmhandle_attach
can be called with a non-NULLns_client:fetchhandle
. If that can actually happen that would trigger an assertion failure inisc_nmhandle_attach
.
Edited by Evan Hunt