]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
The first part of the patch fixes a likely deadlock in the
authorNickolai Zeldovich <kolya@mit.edu>
Thu, 22 Aug 2002 03:00:28 +0000 (03:00 +0000)
committerGarry Zacheiss <zacheiss@mit.edu>
Thu, 22 Aug 2002 03:00:28 +0000 (03:00 +0000)
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.)

src/rx/rx.c

index 72ed2f01e0663db091cdd1630267969b08480d30..1ca01a048a0ecc3445cfa1bab6d655c1da648c06 100644 (file)
@@ -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; i<RX_MAXCALLS; i++) {
            struct rx_call *call = conn->call[i];
            if (call) {