diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-11-19 22:32:43 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-19 22:32:43 +0000 |
commit | a8329e99c58d315bfe748c667f6ce133cd6e4198 (patch) | |
tree | af58cce507081d908debf40f0e5a326678a988b2 /pkg/tcpip/transport/tcp | |
parent | 7dcd014bcfe17836a8ef57e0f840d3c574d07965 (diff) | |
parent | 3454d572199679d6abc66c0c29539829dd9baf51 (diff) |
Merge release-20201109.0-89-g3454d5721 (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r-- | pkg/tcpip/transport/tcp/endpoint.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index 9c9f1ab87..801cf8e0e 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -422,7 +422,10 @@ type endpoint struct { // mu protects all endpoint fields unless documented otherwise. mu must // be acquired before interacting with the endpoint fields. - mu sync.Mutex `state:"nosave"` + // + // During handshake, mu is locked by the protocol listen goroutine and + // released by the handshake completion goroutine. + mu sync.CrossGoroutineMutex `state:"nosave"` ownedByUser uint32 // state must be read/set using the EndpointState()/setEndpointState() |