diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-10-01 01:01:11 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-01 01:01:11 +0000 |
commit | 8968687b46ec140ba3b34147119f55f27134e051 (patch) | |
tree | a1e70926b726f7549f6e2403a14d296160b0d9f6 | |
parent | 763568178afd95a99c073d483405af403614ec25 (diff) | |
parent | 29a1ba54ea427d4fdd357453d74c93d16f5eca9b (diff) |
Merge release-20190806.1-215-g29a1ba5 (automated)
-rw-r--r-- | pkg/sentry/syscalls/linux/sys_splice.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_splice.go b/pkg/sentry/syscalls/linux/sys_splice.go index f0a292f2f..9f705ebca 100644 --- a/pkg/sentry/syscalls/linux/sys_splice.go +++ b/pkg/sentry/syscalls/linux/sys_splice.go @@ -245,12 +245,12 @@ func Splice(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscal if inOffset != 0 || outOffset != 0 { return 0, nil, syserror.ESPIPE } - default: - return 0, nil, syserror.EINVAL - } - // We may not refer to the same pipe; otherwise it's a continuous loop. - if inFile.Dirent.Inode.StableAttr.InodeID == outFile.Dirent.Inode.StableAttr.InodeID { + // We may not refer to the same pipe; otherwise it's a continuous loop. + if inFile.Dirent.Inode.StableAttr.InodeID == outFile.Dirent.Inode.StableAttr.InodeID { + return 0, nil, syserror.EINVAL + } + default: return 0, nil, syserror.EINVAL } |