summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-02 18:35:49 +0000
committergVisor bot <gvisor-bot@google.com>2020-03-02 18:35:49 +0000
commitf259b97e845967859278ea82981882b085fa8636 (patch)
tree00923fe75640e6f48450aa0ff71957d18d9dde22 /pkg/sentry
parent9a57f1ddd5f2dbf0a3df0417ff78d14ebd9fc8aa (diff)
parent42fb7d349137bd8847e7c3df6493fde3bc8e6e89 (diff)
Merge release-20200219.0-77-g42fb7d3 (automated)
Diffstat (limited to 'pkg/sentry')
-rwxr-xr-xpkg/sentry/socket/netstack/netstack.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go
index 48c268bfa..1eeb37446 100755
--- a/pkg/sentry/socket/netstack/netstack.go
+++ b/pkg/sentry/socket/netstack/netstack.go
@@ -2663,7 +2663,9 @@ func (s *SocketOperations) Ioctl(ctx context.Context, _ *fs.File, io usermem.IO,
}
// Add bytes removed from the endpoint but not yet sent to the caller.
+ s.readMu.Lock()
v += len(s.readView)
+ s.readMu.Unlock()
if v > math.MaxInt32 {
v = math.MaxInt32