]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-viced-callback-lock-host-during-multi-breakcallback-20041011
authorDerrick Brashear <shadow@dementia.org>
Wed, 20 Oct 2004 08:41:29 +0000 (08:41 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 20 Oct 2004 08:41:29 +0000 (08:41 +0000)
since it looks like CheckHost is using a gc'd client conn, this more or less has
 to be it.

and don't deadlock.

(cherry picked from commit d98a0af85d857f74ba8c50ae85f397a526822cb8)

src/viced/callback.c

index 98c3521de3102d05edc540fdff54163d9b5ff2c4..ff736600be3239e56380fef3a938dbd8f5f1a85e 100644 (file)
@@ -772,6 +772,7 @@ static void MultiBreakCallBack_r(cba, ncbas, afidp, xhost)
     if (!thishost || (thishost->hostFlags & HOSTDELETED)) {
       continue;
     }
+    rx_GetConnection(thishost->callback_rxcon);
     conns[j++] = thishost->callback_rxcon;
        
 #ifdef ADAPT_MTU
@@ -842,8 +843,10 @@ static void MultiBreakCallBack_r(cba, ncbas, afidp, xhost)
   for (i=0; i<ncbas; i++) {
     struct host *hp;
     hp = cba[i].hp;
-    if (hp && xhost != hp)
+    if (hp && xhost != hp) {
+      rx_PutConnection(hp->callback_rxcon);
       h_Release_r(hp);
+    }
   }
 
 return ;