summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/sys_pipe.go
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2020-09-15 23:37:04 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-15 23:38:57 -0700
commitd201feb8c5e425bfa8abc905f24d49b268520aec (patch)
treeb3aa642d325e2b95bb1a6d5a2f934b6683f61ede /pkg/sentry/syscalls/linux/sys_pipe.go
parentdcd532e2e416aa81ca9ac42dc153731855f91418 (diff)
Enable automated marshalling for the syscall package.
PiperOrigin-RevId: 331940975
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_pipe.go')
-rw-r--r--pkg/sentry/syscalls/linux/sys_pipe.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_pipe.go b/pkg/sentry/syscalls/linux/sys_pipe.go
index c55beb39b..849a47476 100644
--- a/pkg/sentry/syscalls/linux/sys_pipe.go
+++ b/pkg/sentry/syscalls/linux/sys_pipe.go
@@ -16,6 +16,7 @@ package linux
import (
"gvisor.dev/gvisor/pkg/abi/linux"
+ "gvisor.dev/gvisor/pkg/marshal/primitive"
"gvisor.dev/gvisor/pkg/sentry/arch"
"gvisor.dev/gvisor/pkg/sentry/fs"
"gvisor.dev/gvisor/pkg/sentry/kernel"
@@ -46,7 +47,7 @@ func pipe2(t *kernel.Task, addr usermem.Addr, flags uint) (uintptr, error) {
return 0, err
}
- if _, err := t.CopyOut(addr, fds); err != nil {
+ if _, err := primitive.CopyInt32SliceOut(t, addr, fds); err != nil {
for _, fd := range fds {
if file, _ := t.FDTable().Remove(t, fd); file != nil {
file.DecRef(t)