[OpenAFS] Re: 1.3.70 comments?

Derrick J Brashear shadow@dementia.org
Wed, 18 Aug 2004 20:42:52 -0400 (EDT)


On Wed, 18 Aug 2004, Tony D'Amato wrote:

> They both appear to me to end up in src/rx/rx.c in rxi_NewCall(), but
> I'm not sure where to go from here. Any pointers? I've never done any
> kernel coding, but I'll see what I can do...

The real problem is that I'm 100% unfamiliar with kernel debugging tools 
on AIX.
But, I'll make a guess. If this patch finds it, I'll be surprised. If it 
doesn't, I'll guess there's an uninitialized mutex, but I'd have to look 
harder to see if that's detectable.

diff -u -r1.57 rx.c
--- rx.c        28 Jul 2004 22:33:54 -0000      1.57
+++ rx.c        19 Aug 2004 00:42:23 -0000
@@ -2038,7 +2038,8 @@
      if (queue_IsNotEmpty(&rx_freeCallQueue)) {
         call = queue_First(&rx_freeCallQueue, rx_call);
  #endif /* AFS_GLOBAL_RXLOCK_KERNEL */
-       queue_Remove(call);
+       if (queue_IsOnQueue(call))
+         queue_Remove(call);
         MUTEX_ENTER(&rx_stats_mutex);
         rx_stats.nFreeCallStructs--;
         MUTEX_EXIT(&rx_stats_mutex);
@@ -2077,11 +2078,15 @@
         rxi_ResetCall(call, 1);
      }
      call->channel = channel;
-    call->callNumber = &conn->callNumber[channel];
+    if (conn) {
+      call->callNumber = &conn->callNumber[channel];
      /* Note that the next expected call number is retained (in
       * conn->callNumber[i]), even if we reallocate the call structure
       */
      conn->call[channel] = call;
+    } else {
+      printf("conn went away!\n");
+    }
      /* if the channel's never been used (== 0), we should start at 1, otherwise
       * the call number is valid from the last time this channel was used */
      if (*call->callNumber == 0)