From: Simon Wilkinson Date: Wed, 14 Mar 2012 14:56:06 +0000 (-0400) Subject: rx: hold call->lock across RXS_PreparePacket X-Git-Tag: upstream/1.8.0_pre1^2~2699 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0fdcf171a8d2b2153648b6b799096e09eb469beb;p=packages%2Fo%2Fopenafs.git rx: hold call->lock across RXS_PreparePacket RX Security Classes have a right to assume that when RXS_PreparePacket is called that they have exclusive access to the rx_call structure. Commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9 unintentionally failed to acquire the call->lock prior to RXS_PreparePacket being called. Change-Id: I5a9dfb2818fa17ba6fc1ab6f76ec5cde602c6f16 Reviewed-on: http://gerrit.openafs.org/6904 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index 6a8005e11..0f0513d42 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -2736,8 +2736,8 @@ rxi_PrepareSendPacket(struct rx_call *call, } if (len) p->wirevec[i - 1].iov_len += len; - RXS_PreparePacket(conn->securityObject, call, p); MUTEX_ENTER(&call->lock); + RXS_PreparePacket(conn->securityObject, call, p); } /* Given an interface MTU size, calculate an adjusted MTU size that