diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-23 23:17:59 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-23 23:17:59 +0000 |
commit | 6cc57634d5e59f821092d562b3695af94182b2df (patch) | |
tree | a88a24d733aeda2dad17a24fb495d9ec1bf28426 /pkg/sentry/syscalls/linux | |
parent | bb7e27b64dd2197bdf3ecc96c669f6b60db9197c (diff) | |
parent | 0c628c3152a727fff287a98897d83ee45ad990e5 (diff) |
Merge release-20200608.0-112-g0c628c315 (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux')
-rw-r--r-- | pkg/sentry/syscalls/linux/vfs2/inotify.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/inotify.go b/pkg/sentry/syscalls/linux/vfs2/inotify.go index 7d50b6a16..74e5287b7 100644 --- a/pkg/sentry/syscalls/linux/vfs2/inotify.go +++ b/pkg/sentry/syscalls/linux/vfs2/inotify.go @@ -116,8 +116,11 @@ func InotifyAddWatch(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kern } defer d.DecRef() - fd = ino.AddWatch(d.Dentry(), mask) - return uintptr(fd), nil, err + fd, err = ino.AddWatch(d.Dentry(), mask) + if err != nil { + return 0, nil, err + } + return uintptr(fd), nil, nil } // InotifyRmWatch implements the inotify_rm_watch() syscall. |