mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Merge branch '943-race-in-dispatcher-socket' into 'master'
Fix a possible race between udp dispatch and socket code Closes #943 See merge request isc-projects/bind9!1992
This commit is contained in:
commit
28323f5ebf
2 changed files with 10 additions and 5 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
5243. [bug] Fix a possible race between dispatcher and socket
|
||||
code in a high-load cold-cache resolver scenario.
|
||||
[GL #943]
|
||||
|
||||
5242. [bug] In relaxed qname minimizatiom mode, fall back to
|
||||
normal resolution when encountering a lame
|
||||
delegation, and use _.domain/A queries rather
|
||||
|
|
|
|||
|
|
@ -2596,15 +2596,16 @@ isc_socket_open(isc_socket_t *sock0) {
|
|||
|
||||
REQUIRE(VALID_SOCKET(sock));
|
||||
|
||||
REQUIRE(isc_refcount_current(&sock->references) == 1);
|
||||
/*
|
||||
* We don't need to retain the lock hereafter, since no one else has
|
||||
* this socket.
|
||||
*/
|
||||
LOCK(&sock->lock);
|
||||
|
||||
REQUIRE(isc_refcount_current(&sock->references) >= 1);
|
||||
REQUIRE(sock->fd == -1);
|
||||
REQUIRE(sock->threadid == -1);
|
||||
|
||||
result = opensocket(sock->manager, sock, NULL);
|
||||
|
||||
UNLOCK(&sock->lock);
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
sock->fd = -1;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue