From: Nickolai Zeldovich Date: Thu, 22 Aug 2002 03:00:28 +0000 (+0000) Subject: The first part of the patch fixes a likely deadlock in the X-Git-Tag: openafs-stable-1_2_7~38 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0ede42f90f69434f06908d2a60eca07a26432aab;p=packages%2Fo%2Fopenafs.git The first part of the patch fixes a likely deadlock in the case when we're destroying a client connection with active calls. The second part fixes a minor connection refcount leak in my recent modification to protect against half-reachable clients. (Note: the first part of this was pulled up a while ago. The second part wasn't, and is being pulled up now.) --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 72ed2f01e..1ca01a048 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -4282,12 +4282,15 @@ void rxi_ConnectionError(conn, error) { if (error) { register int i; + MUTEX_ENTER(&conn->conn_data_lock); if (conn->challengeEvent) rxevent_Cancel(conn->challengeEvent, (struct rx_call*)0, 0); if (conn->checkReachEvent) { rxevent_Cancel(conn->checkReachEvent, (struct rx_call*)0, 0); conn->checkReachEvent = 0; + conn->refCount--; } + MUTEX_EXIT(&conn->conn_data_lock); for (i=0; icall[i]; if (call) {