From a28b274abb3ac0ce652ee395d5a48e7b7fdfb3ad Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 12 Jul 2018 17:13:41 -0700 Subject: Fix aio eventfd lookup We're failing to set eventFile in the outer scope. PiperOrigin-RevId: 204392995 Change-Id: Ib9b04f839599ef552d7b5951d08223e2b1d5f6ad --- pkg/sentry/syscalls/linux/sys_aio.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/sentry') 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 -- cgit v1.2.3