rx-writevproc-wrong-type-20090207
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 7 Feb 2009 17:22:26 +0000 (17:22 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 7 Feb 2009 17:22:26 +0000 (17:22 +0000)
LICENSE BSD

In rxi_WritevProc the queueScan that sets RX_PKTFLAG_TQ on the packet
really needs to cast the queue objects to rx_packet instead of rx_call.
Trashing random fields is not a good idea.

src/rx/rx_rdwr.c

index 4f5bf06..86784ba 100644 (file)
@@ -1125,7 +1125,7 @@ int
 rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
 {
     struct rx_packet *cp = NULL;
-    struct rx_call *p, *np;
+    struct rx_packet *p, *np;
     int nextio;
     int requestCount;
     struct rx_queue tmpq;
@@ -1262,11 +1262,7 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
     /* Move the packets from the temporary queue onto the transmit queue.
      * We may end up with more than call->twind packets on the queue. */
     
-#ifdef KDUMP_RX_LOCK
-    for (queue_Scan(&tmpq, p, np, rx_call_rx_lock))
-#else
-    for (queue_Scan(&tmpq, p, np, rx_call))
-#endif
+    for (queue_Scan(&tmpq, p, np, rx_packet))
     {
         p->flags |= RX_PKTFLAG_TQ;
     }