summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-05 17:56:24 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-05 17:56:24 +0000
commitefa51d5429461e6b1ae6c3f0d90e947fcd8990a1 (patch)
tree3050037561200755c91186ed210f418a07e1a90a
parenta04eec44052aa0fb77a0f0b7980591284665da9d (diff)
parent2a200811d4c95e1c84d2bdd56068f02d46ebc524 (diff)
Merge release-20201208.0-103-g2a200811d (automated)
-rw-r--r--pkg/sentry/fsimpl/fuse/fusefs.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/fuse/fusefs.go b/pkg/sentry/fsimpl/fuse/fusefs.go
index 3af807a21..204d8d143 100644
--- a/pkg/sentry/fsimpl/fuse/fusefs.go
+++ b/pkg/sentry/fsimpl/fuse/fusefs.go
@@ -129,6 +129,9 @@ func (fsType FilesystemType) GetFilesystem(ctx context.Context, vfsObj *vfs.Virt
return nil, nil, syserror.EINVAL
}
fuseFDGeneric := kernelTask.GetFileVFS2(int32(deviceDescriptor))
+ if fuseFDGeneric == nil {
+ return nil, nil, syserror.EINVAL
+ }
defer fuseFDGeneric.DecRef(ctx)
fuseFD, ok := fuseFDGeneric.Impl().(*DeviceFD)
if !ok {