summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/host
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-07-02 05:07:49 +0000
committergVisor bot <gvisor-bot@google.com>2020-07-02 05:07:49 +0000
commit236133c323772a13529976bdce4f284ab72c4528 (patch)
tree1ac820cf7fdeb84c6a731fe42d055767ff449539 /pkg/sentry/fsimpl/host
parentd9192ae3ee2376f2021f133d434e22ba76c477cc (diff)
parent6c099d830091b3153e0dc39cf500dba441f45707 (diff)
Merge release-20200622.1-59-g6c099d830 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/host')
-rw-r--r--pkg/sentry/fsimpl/host/host.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/host/host.go b/pkg/sentry/fsimpl/host/host.go
index 007b3332e..1cd2982cb 100644
--- a/pkg/sentry/fsimpl/host/host.go
+++ b/pkg/sentry/fsimpl/host/host.go
@@ -588,8 +588,10 @@ func (f *fileDescription) Read(ctx context.Context, dst usermem.IOSequence, opts
}
func readFromHostFD(ctx context.Context, hostFD int, dst usermem.IOSequence, offset int64, flags uint32) (int64, error) {
+ // Check that flags are supported.
+ //
// TODO(gvisor.dev/issue/2601): Support select preadv2 flags.
- if flags != 0 {
+ if flags&^linux.RWF_HIPRI != 0 {
return 0, syserror.EOPNOTSUPP
}
reader := hostfd.GetReadWriterAt(int32(hostFD), offset, flags)