diff options
author | Andrei Vagin <avagin@google.com> | 2021-02-09 01:32:55 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-09 01:34:45 -0800 |
commit | d6dbe6e5ca5445dac278d3b6654af8d13379878a (patch) | |
tree | 7532e7095ec8988b5bed59c3ebb2e8b156eaabbd /pkg/sentry/fsimpl/tmpfs | |
parent | 3f802e7180cfe703ecb97d8f2b6ba32257cf6216 (diff) |
pipe: writeLocked has to return ErrWouldBlock if the pipe is full
PiperOrigin-RevId: 356450303
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs')
-rw-r--r-- | pkg/sentry/fsimpl/tmpfs/regular_file.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/regular_file.go b/pkg/sentry/fsimpl/tmpfs/regular_file.go index 6255a7c84..82a743ff3 100644 --- a/pkg/sentry/fsimpl/tmpfs/regular_file.go +++ b/pkg/sentry/fsimpl/tmpfs/regular_file.go @@ -656,6 +656,9 @@ func (rw *regularFileReadWriter) WriteFromBlocks(srcs safemem.BlockSeq) (uint64, // Write to that memory as usual. seg, gap = rw.file.data.Insert(gap, gapMR, fr.Start), fsutil.FileRangeGapIterator{} + + default: + panic("unreachable") } } exitLoop: |