summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-07-09 00:14:56 +0000
committergVisor bot <gvisor-bot@google.com>2020-07-09 00:14:56 +0000
commit61659491473d258a9e6ac658f8906ee5441b1d3a (patch)
tree72edb742245888533e83eb818d22e1861eb118fa /pkg/sentry/vfs
parent1faf4e5c1e9d14fcff758a60328ff4eb7fbee0de (diff)
parentc4815af9475cc4680c6d598d9c930de892c98aae (diff)
Merge release-20200622.1-85-gc4815af94 (automated)
Diffstat (limited to 'pkg/sentry/vfs')
-rw-r--r--pkg/sentry/vfs/vfs.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/vfs.go b/pkg/sentry/vfs/vfs.go
index 58c7ad778..522e27475 100644
--- a/pkg/sentry/vfs/vfs.go
+++ b/pkg/sentry/vfs/vfs.go
@@ -123,6 +123,9 @@ type VirtualFilesystem struct {
// Init initializes a new VirtualFilesystem with no mounts or FilesystemTypes.
func (vfs *VirtualFilesystem) Init() error {
+ if vfs.mountpoints != nil {
+ panic("VFS already initialized")
+ }
vfs.mountpoints = make(map[*Dentry]map[*Mount]struct{})
vfs.devices = make(map[devTuple]*registeredDevice)
vfs.anonBlockDevMinorNext = 1