summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/vfs2/eventfd.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-07 19:46:45 +0000
committergVisor bot <gvisor-bot@google.com>2020-05-07 19:46:45 +0000
commita5732c2feea817d08a240baf1b78c850431cd5bd (patch)
tree17e3ed36a6ad817f357047378160c9ea8c4ab93d /pkg/sentry/syscalls/linux/vfs2/eventfd.go
parentca611916a7c44059975f273183b1fb25bfe656ae (diff)
parentd0b1d0233dc8a8ac837d534cd0664eabb9dd0a71 (diff)
Merge release-20200422.0-49-gd0b1d02 (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux/vfs2/eventfd.go')
-rwxr-xr-xpkg/sentry/syscalls/linux/vfs2/eventfd.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/eventfd.go b/pkg/sentry/syscalls/linux/vfs2/eventfd.go
index bd2194972..aff1a2070 100755
--- a/pkg/sentry/syscalls/linux/vfs2/eventfd.go
+++ b/pkg/sentry/syscalls/linux/vfs2/eventfd.go
@@ -17,6 +17,7 @@ package vfs2
import (
"gvisor.dev/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/sentry/arch"
+ "gvisor.dev/gvisor/pkg/sentry/fsimpl/eventfd"
"gvisor.dev/gvisor/pkg/sentry/kernel"
"gvisor.dev/gvisor/pkg/syserror"
)
@@ -31,12 +32,13 @@ func Eventfd2(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysc
return 0, nil, syserror.EINVAL
}
+ vfsObj := t.Kernel().VFS()
fileFlags := uint32(linux.O_RDWR)
if flags&linux.EFD_NONBLOCK != 0 {
fileFlags |= linux.O_NONBLOCK
}
semMode := flags&linux.EFD_SEMAPHORE != 0
- eventfd, err := t.Kernel().VFS().NewEventFD(initVal, semMode, fileFlags)
+ eventfd, err := eventfd.New(vfsObj, initVal, semMode, fileFlags)
if err != nil {
return 0, nil, err
}