summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-19 03:30:47 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-19 03:30:47 +0000
commit3fb567945c1c03955a5da39869fd853cc28985c9 (patch)
treec860a3da2690a11d31a2d251707174739ac10ab0 /pkg/sentry/socket
parentea05bb1ce68abd67d6bb7b36b58f8ee43f4d5405 (diff)
parent70c45e09cfd15abeebd640a9a2ddd214078db651 (diff)
Merge release-20200608.0-89-g70c45e09c (automated)
Diffstat (limited to 'pkg/sentry/socket')
-rw-r--r--pkg/sentry/socket/unix/transport/connectioned.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/socket/unix/transport/connectioned.go b/pkg/sentry/socket/unix/transport/connectioned.go
index 09c6d3b27..a1e49cc57 100644
--- a/pkg/sentry/socket/unix/transport/connectioned.go
+++ b/pkg/sentry/socket/unix/transport/connectioned.go
@@ -476,6 +476,9 @@ func (e *connectionedEndpoint) Readiness(mask waiter.EventMask) waiter.EventMask
// State implements socket.Socket.State.
func (e *connectionedEndpoint) State() uint32 {
+ e.Lock()
+ defer e.Unlock()
+
if e.Connected() {
return linux.SS_CONNECTED
}