[master] fix race
3804. [bug] Corrected a race condition in dispatch.c in which
portentry could be reset leading to an assertion
failure in socket_search(). (Change #3708
addressed the same issue but was incomplete.)
[RT #35128]
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -1,3 +1,9 @@
|
||||
3804. [bug] Corrected a race condition in dispatch.c in which
|
||||
portentry could be reset leading to an assertion
|
||||
failure in socket_search(). (Change #3708
|
||||
addressed the same issue but was incomplete.)
|
||||
[RT #35128]
|
||||
|
||||
3803. [bug] "named-checkconf -z" incorrectly rejected zones
|
||||
using alternate data sources for not having a "file"
|
||||
option. [RT #35685]
|
||||
|
||||
@@ -796,14 +796,19 @@ deref_portentry(dns_dispatch_t *disp, dispportentry_t **portentryp) {
|
||||
portentry, link);
|
||||
isc_mempool_put(disp->portpool, portentry);
|
||||
}
|
||||
UNLOCK(&qid->lock);
|
||||
|
||||
/*
|
||||
* Set '*portentryp' to NULL inside the lock so that
|
||||
* dispsock->portentry does not change in socket_search.
|
||||
*/
|
||||
*portentryp = NULL;
|
||||
|
||||
UNLOCK(&qid->lock);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Find a dispsocket for socket address 'dest', and port number 'port'.
|
||||
* Return NULL if no such entry exists.
|
||||
* Return NULL if no such entry exists. Requires qid->lock to be held.
|
||||
*/
|
||||
static dispsocket_t *
|
||||
socket_search(dns_qid_t *qid, isc_sockaddr_t *dest, in_port_t port,
|
||||
|
||||
Reference in New Issue
Block a user