diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-03 20:39:15 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-03 20:39:15 +0000 |
commit | 5dc426b55a2b3f695303aa76a3294585a0b32168 (patch) | |
tree | b86d9c4c87cdd163af284499076a589f0de25d86 /pkg/sentry/syscalls/linux/sys_splice.go | |
parent | ea213f005adb71369f5a32cc38b096179f20ea8d (diff) | |
parent | b2ae7ea1bb207eddadd7962080e7bd0b8634db96 (diff) |
Merge release-20200622.1-313-gb2ae7ea1b (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_splice.go')
-rw-r--r-- | pkg/sentry/syscalls/linux/sys_splice.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_splice.go b/pkg/sentry/syscalls/linux/sys_splice.go index 77c78889d..b8846a10a 100644 --- a/pkg/sentry/syscalls/linux/sys_splice.go +++ b/pkg/sentry/syscalls/linux/sys_splice.go @@ -101,7 +101,7 @@ func Sendfile(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysc if inFile == nil { return 0, nil, syserror.EBADF } - defer inFile.DecRef() + defer inFile.DecRef(t) if !inFile.Flags().Read { return 0, nil, syserror.EBADF @@ -111,7 +111,7 @@ func Sendfile(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysc if outFile == nil { return 0, nil, syserror.EBADF } - defer outFile.DecRef() + defer outFile.DecRef(t) if !outFile.Flags().Write { return 0, nil, syserror.EBADF @@ -192,13 +192,13 @@ func Splice(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscal if outFile == nil { return 0, nil, syserror.EBADF } - defer outFile.DecRef() + defer outFile.DecRef(t) inFile := t.GetFile(inFD) if inFile == nil { return 0, nil, syserror.EBADF } - defer inFile.DecRef() + defer inFile.DecRef(t) // The operation is non-blocking if anything is non-blocking. // @@ -300,13 +300,13 @@ func Tee(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallCo if outFile == nil { return 0, nil, syserror.EBADF } - defer outFile.DecRef() + defer outFile.DecRef(t) inFile := t.GetFile(inFD) if inFile == nil { return 0, nil, syserror.EBADF } - defer inFile.DecRef() + defer inFile.DecRef(t) // All files must be pipes. if !fs.IsPipe(inFile.Dirent.Inode.StableAttr) || !fs.IsPipe(outFile.Dirent.Inode.StableAttr) { |