2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

2979. [bug] named could deadlock during shutdown if two

"rndc stop" commands were issued at the same
			time. [RT #22108]
This commit is contained in:
Evan Hunt
2010-12-03 22:05:19 +00:00
parent 310e10d536
commit e78c2b856b
7 changed files with 47 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.85 2010/11/18 00:59:43 tbox Exp $ */
/* $Id: socket.c,v 1.86 2010/12/03 22:05:19 each Exp $ */
/* This code uses functions which are only available on Server 2003 and
* higher, and Windows XP and higher.
@@ -3313,6 +3313,12 @@ isc__socket_accept(isc_socket_t *sock,
* Attach to socket and to task.
*/
isc_task_attach(task, &ntask);
if (isc_task_exiting(ntask)) {
isc_task_detach(&ntask);
isc_event_free(ISC_EVENT_PTR(&dev));
UNLOCK(&sock->lock);
return (ISC_R_SHUTTINGDOWN);
}
nsock->references++;
adev->ev_sender = ntask;