From: Jeffrey Altman Date: Thu, 25 Sep 2008 21:17:54 +0000 (+0000) Subject: DEVEL15-rx-clear-queues-correctly-20080925 X-Git-Tag: openafs-devel-1_5_53~4 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=18bc1f8c2ee8149c86ebbd0e29ae0d1de9dd78a1;p=packages%2Fo%2Fopenafs.git DEVEL15-rx-clear-queues-correctly-20080925 LICENSE IPL10 don't potentially leak packets by leaving them behind and initing queues; in fact, if you are cleaning up there is no need to init queues anyway. (cherry picked from commit 8b50c9d9e3d181f749d0982f57410a5b4906627c) --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 4305fde6a..6e413ea53 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -1222,7 +1222,7 @@ rx_NewCall(register struct rx_connection *conn) rxi_WaitforTQBusy(call); if (call->flags & RX_CALL_TQ_CLEARME) { rxi_ClearTransmitQueue(call, 1); - queue_Init(&call->tq); + /*queue_Init(&call->tq);*/ } MUTEX_EXIT(&call->lock); #endif /* AFS_GLOBAL_RXLOCK_KERNEL */ @@ -2175,7 +2175,7 @@ rxi_NewCall(register struct rx_connection *conn, register int channel) /* Now, if TQ wasn't cleared earlier, do it now. */ if (call->flags & RX_CALL_TQ_CLEARME) { rxi_ClearTransmitQueue(call, 1); - queue_Init(&call->tq); + /*queue_Init(&call->tq);*/ } #endif /* AFS_GLOBAL_RXLOCK_KERNEL */ /* Bind the call to its connection structure */ @@ -2184,7 +2184,7 @@ rxi_NewCall(register struct rx_connection *conn, register int channel) } else { call = (struct rx_call *)rxi_Alloc(sizeof(struct rx_call)); - rx_MutexIncrement(rx_stats.nFreeCallStructs, rx_stats_mutex); + rx_MutexIncrement(rx_stats.nCallStructs, rx_stats_mutex); MUTEX_EXIT(&rx_freeCallQueue_lock); MUTEX_INIT(&call->lock, "call lock", MUTEX_DEFAULT, NULL); MUTEX_ENTER(&call->lock); diff --git a/src/rx/rx_rdwr.c b/src/rx/rx_rdwr.c index 14171447a..22149af70 100644 --- a/src/rx/rx_rdwr.c +++ b/src/rx/rx_rdwr.c @@ -728,7 +728,7 @@ rxi_WriteProc(register struct rx_call *call, register char *buf, RX_CALL_FAST_RECOVER_WAIT))) { rxi_Start(0, call, 0, 0); } - } else else if (cp) { + } else if (cp) { cp->flags &= ~RX_PKTFLAG_CP; rxi_FreePacket(cp); cp = call->currentPacket = (struct rx_packet *)0;