summaryrefslogtreecommitdiffhomepage
path: root/pkg/safecopy/safecopy_unsafe.go
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2020-11-06 12:53:49 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-06 12:55:29 -0800
commit53eeb06ef14915eee799e9d7d59603ed2a0fe1c1 (patch)
tree038f56ca3f0c464d61a4b2ca6f482127c01c613c /pkg/safecopy/safecopy_unsafe.go
parent955e09dfbdb8a4cdae0a0b625001a567f6f15758 (diff)
Fix infinite loop when splicing to pipes/eventfds.
Writes to pipes of size < PIPE_BUF are guaranteed to be atomic, so writes larger than that will return EAGAIN if the pipe has capacity < PIPE_BUF. Writes to eventfds will return EAGAIN if the write would cause the eventfd value to go over the max. In both such cases, calling Ready() on the FD will return true (because it is possible to write), but specific kinds of writes will in fact return EAGAIN. This CL fixes an infinite loop in splice and sendfile (VFS1 and VFS2) by forcing skipping the readiness check for the outfile in send, splice, and tee. PiperOrigin-RevId: 341102260
Diffstat (limited to 'pkg/safecopy/safecopy_unsafe.go')
0 files changed, 0 insertions, 0 deletions