summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/netstack/netstack_vfs2.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/socket/netstack/netstack_vfs2.go')
-rw-r--r--pkg/sentry/socket/netstack/netstack_vfs2.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/pkg/sentry/socket/netstack/netstack_vfs2.go b/pkg/sentry/socket/netstack/netstack_vfs2.go
index b756bfca0..6f70b02fc 100644
--- a/pkg/sentry/socket/netstack/netstack_vfs2.go
+++ b/pkg/sentry/socket/netstack/netstack_vfs2.go
@@ -16,7 +16,6 @@ package netstack
import (
"gvisor.dev/gvisor/pkg/abi/linux"
- "gvisor.dev/gvisor/pkg/amutex"
"gvisor.dev/gvisor/pkg/context"
"gvisor.dev/gvisor/pkg/marshal"
"gvisor.dev/gvisor/pkg/marshal/primitive"
@@ -131,18 +130,10 @@ func (s *SocketVFS2) Write(ctx context.Context, src usermem.IOSequence, opts vfs
}
f := &ioSequencePayload{ctx: ctx, src: src}
- n, resCh, err := s.Endpoint.Write(f, tcpip.WriteOptions{})
+ n, err := s.Endpoint.Write(f, tcpip.WriteOptions{})
if err == tcpip.ErrWouldBlock {
return 0, syserror.ErrWouldBlock
}
-
- if resCh != nil {
- if err := amutex.Block(ctx, resCh); err != nil {
- return 0, err
- }
- n, _, err = s.Endpoint.Write(f, tcpip.WriteOptions{})
- }
-
if err != nil {
return 0, syserr.TranslateNetstackError(err).ToError()
}