gvisor/pkg/sentry/fsimpl/host
Dean Deng 0fb5353e45 Initialize references with a value of 1.
This lets us avoid treating a value of 0 as one reference. All references
using the refsvfs2 template must call InitRefs() before the reference is
incremented/decremented, or else a panic will occur. Therefore, it should be
pretty easy to identify missing InitRef calls during testing.

Updates #1486.

PiperOrigin-RevId: 341411151
2020-11-09 08:33:17 -08:00
..
BUILD [vfs] Refactor hostfs mmap into kernfs util. 2020-10-28 11:50:11 -07:00
control.go Support VFS2 save/restore. 2020-10-23 17:48:33 -07:00
host.go Initialize references with a value of 1. 2020-11-09 08:33:17 -08:00
ioctl_unsafe.go Port imported TTY fds to vfs2. 2020-03-18 19:12:10 -07:00
save_restore.go [vfs] Refactor hostfs mmap into kernfs util. 2020-10-28 11:50:11 -07:00
socket.go Initialize references with a value of 1. 2020-11-09 08:33:17 -08:00
socket_iovec.go fdbased: Vectorized write for packet; relax writev syscall filter. 2020-07-15 15:05:32 -07:00
socket_unsafe.go Fix host unix socket to not swallow EOF incorrectly. 2020-09-11 11:56:04 -07:00
tty.go Add basic stateify annotations. 2020-09-24 10:13:04 -07:00
util.go Support VFS2 save/restore. 2020-10-23 17:48:33 -07:00
util_unsafe.go Whitelist utimensat(2). 2020-03-19 23:30:21 -07:00