diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2020-03-23 16:05:29 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-23 16:06:33 -0700 |
commit | 369cf38bd7186da97e134538cd4839a8a4d1aa2c (patch) | |
tree | 5e5ce02261819d8b901e8fecd4cddd9c635d3c52 /pkg/sentry/socket | |
parent | 6eebaea94936ffefd3603ff16ad2225856313fa3 (diff) |
Fix data race in SetSockOpt.
PiperOrigin-RevId: 302539171
Diffstat (limited to 'pkg/sentry/socket')
-rw-r--r-- | pkg/sentry/socket/netstack/netstack.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go index a6ef7a47e..c19f5639b 100644 --- a/pkg/sentry/socket/netstack/netstack.go +++ b/pkg/sentry/socket/netstack/netstack.go @@ -2382,9 +2382,9 @@ func (s *SocketOperations) nonBlockingRead(ctx context.Context, dst usermem.IOSe // caller-supplied buffer. s.readMu.Lock() n, err := s.coalescingRead(ctx, dst, trunc) - s.readMu.Unlock() cmsg := s.controlMessages() s.fillCmsgInq(&cmsg) + s.readMu.Unlock() return n, 0, nil, 0, cmsg, err } |