summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/netstack/netstack.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-10 01:03:05 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-10 01:03:05 +0000
commitceda3410aecf7ccce770d6891a5b480e0857f497 (patch)
tree6730d5db590cd90c1b949e4316c3c7167c41ab68 /pkg/sentry/socket/netstack/netstack.go
parent3885a08fa592810679aa96a6911ee61e483d4c3c (diff)
parentc9195349c9ac24ccb538e92b308225dfa4184c42 (diff)
Merge release-20200323.0-113-gc919534 (automated)
Diffstat (limited to 'pkg/sentry/socket/netstack/netstack.go')
-rwxr-xr-xpkg/sentry/socket/netstack/netstack.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go
index 20e3fa0d2..7ac38764d 100755
--- a/pkg/sentry/socket/netstack/netstack.go
+++ b/pkg/sentry/socket/netstack/netstack.go
@@ -535,7 +535,7 @@ func (s *SocketOperations) Write(ctx context.Context, _ *fs.File, src usermem.IO
}
if resCh != nil {
- t := ctx.(*kernel.Task)
+ t := kernel.TaskFromContext(ctx)
if err := t.Block(resCh); err != nil {
return 0, syserr.FromError(err).ToError()
}
@@ -608,7 +608,7 @@ func (s *SocketOperations) ReadFrom(ctx context.Context, _ *fs.File, r io.Reader
}
if resCh != nil {
- t := ctx.(*kernel.Task)
+ t := kernel.TaskFromContext(ctx)
if err := t.Block(resCh); err != nil {
return 0, syserr.FromError(err).ToError()
}