diff options
author | Dean Deng <deandeng@google.com> | 2020-07-30 10:21:12 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-30 10:27:44 -0700 |
commit | c43305731e04ce8d4f2c9b2949c326abc9c2b77e (patch) | |
tree | 8c15f3663f239a4a84e9d9693cd4901dbc4d33cc /pkg/sentry/syscalls/linux/vfs2 | |
parent | f7281902f8f6f748e661c2b18a0bd3b227a55ce8 (diff) |
Fix SETOWN_EX return value.
Return on success should be 0, not size of the struct copied out.
PiperOrigin-RevId: 324029193
Diffstat (limited to 'pkg/sentry/syscalls/linux/vfs2')
-rw-r--r-- | pkg/sentry/syscalls/linux/vfs2/fd.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/fd.go b/pkg/sentry/syscalls/linux/vfs2/fd.go index 517394ba9..67f191551 100644 --- a/pkg/sentry/syscalls/linux/vfs2/fd.go +++ b/pkg/sentry/syscalls/linux/vfs2/fd.go @@ -185,11 +185,11 @@ func Fcntl(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscall return 0, nil, err case linux.F_SETOWN_EX: var owner linux.FOwnerEx - n, err := t.CopyIn(args[2].Pointer(), &owner) + _, err := t.CopyIn(args[2].Pointer(), &owner) if err != nil { return 0, nil, err } - return uintptr(n), nil, setAsyncOwner(t, file, owner.Type, owner.PID) + return 0, nil, setAsyncOwner(t, file, owner.Type, owner.PID) case linux.F_GETPIPE_SZ: pipefile, ok := file.Impl().(*pipe.VFSPipeFD) if !ok { |