2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +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.331 2010/12/03 00:54:39 marka Exp $ */
/* $Id: socket.c,v 1.332 2010/12/03 22:05:19 each Exp $ */
/*! \file */
@@ -5115,6 +5115,12 @@ isc__socket_accept(isc_socket_t *sock0,
* 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++;
nsock->statsindex = sock->statsindex;