rx: hold call->lock across RXS_PreparePacket
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 14 Mar 2012 14:56:06 +0000 (10:56 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 15 Mar 2012 15:24:40 +0000 (08:24 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/rx/rx_packet.c

index 6a8005e..0f0513d 100644 (file)
@@ -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