From: Evan Hunt Date: Mon, 7 Nov 2011 23:03:09 +0000 (+0000) Subject: 3210. [bug] Canceling the oldest query due to recursive-client X-Git-Tag: v9.9.0b2~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83c0ef88159fcae73fdbf8fe04d220c1878cce3e;p=thirdparty%2Fbind9.git 3210. [bug] Canceling the oldest query due to recursive-client overload could trigger an assertion failure. [RT #26463] --- diff --git a/CHANGES b/CHANGES index 5327909be7b..95e045582ff 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3210. [bug] Canceling the oldest query due to recursive-client + overload could trigger an assertion failure. [RT #26463] + 3209. [func] Add "dnssec-lookaside 'no'". [RT #24858] 3208. [bug] 'dig -y' handle unknown tsig alorithm better. diff --git a/bin/named/client.c b/bin/named/client.c index 374fdbaaff0..d77e73bb5cb 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: client.c,v 1.282 2011/11/03 21:14:22 each Exp $ */ +/* $Id: client.c,v 1.283 2011/11/07 23:03:09 each Exp $ */ #include @@ -349,10 +349,16 @@ exit_check(ns_client_t *client) { * I/O cancel is complete. Burn down all state * related to the current request. Ensure that * the client is no longer on the recursing list. + * + * We need to check whether the client is still linked, + * because it may already have been removed from the + * recursing list by ns_client_killoldestquery() */ if (client->state == NS_CLIENTSTATE_RECURSING) { LOCK(&manager->reclock); - ISC_LIST_UNLINK(manager->recursing, client, rlink); + if (ISC_LINK_LINKED(client, rlink)) + ISC_LIST_UNLINK(manager->recursing, + client, rlink); UNLOCK(&manager->reclock); } ns_client_endrequest(client);