diff options
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_stat.go')
-rw-r--r-- | pkg/sentry/syscalls/linux/sys_stat.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_stat.go b/pkg/sentry/syscalls/linux/sys_stat.go index 8d6a8f616..bdfb9b3ef 100644 --- a/pkg/sentry/syscalls/linux/sys_stat.go +++ b/pkg/sentry/syscalls/linux/sys_stat.go @@ -133,7 +133,7 @@ func stat(t *kernel.Task, d *fs.Dirent, dirPath bool, statAddr usermem.Addr) err // common syscall for many applications, and t.CopyObjectOut has // noticeable performance impact due to its many slice allocations and // use of reflection. - b := make([]byte, 0, linux.SizeOfStat) + b := t.CopyScratchBuffer(int(linux.SizeOfStat))[:0] // Dev (uint64) b = binary.AppendUint64(b, usermem.ByteOrder, uint64(d.Inode.StableAttr.DeviceID)) |