diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-05-07 19:46:45 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-07 19:46:45 +0000 |
commit | a5732c2feea817d08a240baf1b78c850431cd5bd (patch) | |
tree | 17e3ed36a6ad817f357047378160c9ea8c4ab93d /pkg/sentry/syscalls/linux/vfs2/eventfd.go | |
parent | ca611916a7c44059975f273183b1fb25bfe656ae (diff) | |
parent | d0b1d0233dc8a8ac837d534cd0664eabb9dd0a71 (diff) |
Merge release-20200422.0-49-gd0b1d02 (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux/vfs2/eventfd.go')
-rwxr-xr-x | pkg/sentry/syscalls/linux/vfs2/eventfd.go | 4 |
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 } |