Lock zone before calling zone_namerd_tostr()
WARNING: ThreadSanitizer: data race Read of size 8 at 0x000000000001 by thread T1: #0 inline_raw lib/dns/zone.c:1375 #1 zone_namerd_tostr lib/dns/zone.c:15316 #2 dns_zone_name lib/dns/zone.c:15391 #3 xfrin_log lib/dns/xfrin.c:1605 #4 (closed) xfrin_destroy lib/dns/xfrin.c:1477 #5 (closed) dns_xfrin_detach lib/dns/xfrin.c:739 #6 (closed) xfrin_connect_done lib/dns/xfrin.c:970 #7 (closed) tcpdnsconnect_cb netmgr/tcpdns.c:786 #8 (closed) tcp_connect_cb netmgr/tcp.c:292 #9 (closed) #10 (closed)
Previous write of size 8 at 0x000000000001 by thread T2 (mutexes: write M1):
#0 zone_shutdown lib/dns/zone.c:14462
#1 dispatch lib/isc/task.c:1152
#2 run lib/isc/task.c:1344
#3 <null> <null>
Location is heap block of size 2769 at 0x000000000013 allocated by thread T3:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:713
#2 mem_get lib/isc/mem.c:622
#3 mem_allocateunlocked lib/isc/mem.c:1268
#4 isc___mem_allocate lib/isc/mem.c:1288
#5 isc__mem_allocate lib/isc/mem.c:2453
#6 isc___mem_get lib/isc/mem.c:1037
#7 isc__mem_get lib/isc/mem.c:2432
#8 dns_zone_create lib/dns/zone.c:984
#9 configure_zone bin/named/server.c:6502
#10 do_addzone bin/named/server.c:13391
#11 named_server_changezone bin/named/server.c:13788
#12 named_control_docommand bin/named/control.c:207
#13 control_command bin/named/controlconf.c:392
#14 dispatch lib/isc/task.c:1152
#15 run lib/isc/task.c:1344
#16 <null> <null>
(cherry picked from commit 84f43903)
Closes #2259 (closed)