[OpenAFS-devel] series of 1.4.2 fileserver crashes in rxi_FreeDataBufsTSFPQ (rx_packet.c)

Derrick J Brashear shadow@dementia.org
Tue, 5 Dec 2006 12:45:30 -0500 (EST)


Try this

--- rx_packet.c 31 Jul 2006 15:08:20 -0000      1.35.2.25
+++ rx_packet.c 5 Dec 2006 17:45:01 -0000
@@ -2617,8 +2617,8 @@
         if (nb)
             rxi_FreePackets(nb, &q);

-       p->niovecs = i;
-       p->wirevec[i - 1].iov_len += len;
+       p->niovecs = MAX(2, i);
+       p->wirevec[MAX(2, i) - 1].iov_len += len;
      }
      RXS_PreparePacket(conn->securityObject, call, p);
  }