summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/vfs2/ioctl.go
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2020-09-01 13:38:44 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-01 13:41:01 -0700
commit04c284f8c2015b801c929325a6304e601eb94e56 (patch)
tree801e86a587f04b5031c88856f6b11c2901f05e53 /pkg/sentry/syscalls/linux/vfs2/ioctl.go
parent723fb5c1164872fd1de418d794aa1e9eced8fd94 (diff)
Fix panic when calling dup2().
PiperOrigin-RevId: 329572337
Diffstat (limited to 'pkg/sentry/syscalls/linux/vfs2/ioctl.go')
-rw-r--r--pkg/sentry/syscalls/linux/vfs2/ioctl.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/ioctl.go b/pkg/sentry/syscalls/linux/vfs2/ioctl.go
index 38778a388..baa8a49af 100644
--- a/pkg/sentry/syscalls/linux/vfs2/ioctl.go
+++ b/pkg/sentry/syscalls/linux/vfs2/ioctl.go
@@ -34,13 +34,13 @@ func Ioctl(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscall
// Handle ioctls that apply to all FDs.
switch args[1].Int() {
case linux.FIONCLEX:
- t.FDTable().SetFlagsVFS2(fd, kernel.FDFlags{
+ t.FDTable().SetFlagsVFS2(t, fd, kernel.FDFlags{
CloseOnExec: false,
})
return 0, nil, nil
case linux.FIOCLEX:
- t.FDTable().SetFlagsVFS2(fd, kernel.FDFlags{
+ t.FDTable().SetFlagsVFS2(t, fd, kernel.FDFlags{
CloseOnExec: true,
})
return 0, nil, nil