Lock the adbname and adbentry prior to unlocking hash locks

Ondřej Surý requested to merge ondrej-fix-data-race-in-dns_adb into main

There was a datarace that could expire a freshly created ADB names and entries between the return from get_attached_{name,entry} and locking it again. Lock the ADB name and ADB entry inside the hash table lock, so they won't get expired until the full initialization has been complete.

Closes #3739 (closed)

Edited by Michał Kępień

Merge request reports