summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/sys_aio.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2018-07-12 17:13:41 -0700
committerShentubot <shentubot@google.com>2018-07-12 17:14:50 -0700
commita28b274abb3ac0ce652ee395d5a48e7b7fdfb3ad (patch)
treec8eb542504ccf429ee5dffd2652b4309f5088ae6 /pkg/sentry/syscalls/linux/sys_aio.go
parent1cd46c8dd1a92dd0ad3eeb60a763278f2e98d0b4 (diff)
Fix aio eventfd lookup
We're failing to set eventFile in the outer scope. PiperOrigin-RevId: 204392995 Change-Id: Ib9b04f839599ef552d7b5951d08223e2b1d5f6ad
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_aio.go')
-rw-r--r--pkg/sentry/syscalls/linux/sys_aio.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_aio.go b/pkg/sentry/syscalls/linux/sys_aio.go
index 345ef9bec..fc3397081 100644
--- a/pkg/sentry/syscalls/linux/sys_aio.go
+++ b/pkg/sentry/syscalls/linux/sys_aio.go
@@ -300,7 +300,7 @@ func submitCallback(t *kernel.Task, id uint64, cb *ioCallback, cbAddr usermem.Ad
// Was there an eventFD? Extract it.
var eventFile *fs.File
if cb.Flags&_IOCB_FLAG_RESFD != 0 {
- eventFile := t.FDMap().GetFile(kdefs.FD(cb.ResFD))
+ eventFile = t.FDMap().GetFile(kdefs.FD(cb.ResFD))
if eventFile == nil {
// Bad FD.
return syserror.EBADF