From: Derrick Brashear Date: Thu, 28 Oct 2004 19:09:04 +0000 (+0000) Subject: STABLE14-drop-h-lock-around-putconn-20041027 X-Git-Tag: openafs-devel-1_3_74~22 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=46239bd78681bb8b51237800f425691d5665835e;p=packages%2Fo%2Fopenafs.git STABLE14-drop-h-lock-around-putconn-20041027 the problem with rx_PutConnection is h_FreeConnection uses the host global lock ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== the problem with rx_PutConnection is h_FreeConnection uses the host global lock but it shouldn't matter (callback conn should be a client not server conn and thus not h_FreeConnection on cleanup) further, we should free the conns we GetConnection'd not the ones still in the host struct at the end. (cherry picked from commit 2fbfef7f9157aad571307564faae1ce7aae4e3be) --- diff --git a/src/viced/callback.c b/src/viced/callback.c index 90d684d72..fc45bb379 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -855,11 +855,20 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas, struct host *hp; hp = cba[i].hp; if (hp && xhost != hp) { - rx_PutConnection(hp->callback_rxcon); h_Release_r(hp); } } + /* H_UNLOCK around this so h_FreeConnection does not deadlock. + h_FreeConnection should *never* be called on a callback connection, + but on 10/27/04 a deadlock occurred where it was, when we know why, + this should be reverted. -- shadow */ + H_UNLOCK; + for (i = 0; i < j; i++) { + rx_PutConnection(conns[i]); + } + H_LOCK; + return; }