diff options
author | Fabricio Voznika <fvoznika@google.com> | 2021-03-30 11:35:03 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-30 11:36:55 -0700 |
commit | 71f3dccbb3d47cbf572afe0737a29c8d87fde9c9 (patch) | |
tree | 9b829889119c9abaf0b764ccbc9b015121054366 /runsc/container | |
parent | 8a2f7e716dcc62f04d2808e8ade34941c94fc956 (diff) |
Fix panic when overriding /dev files with VFS2
VFS1 skips over mounts that overrides files in /dev because the list of
files is hardcoded. This is not needed for VFS2 and a recent change
lifted this restriction. However, parts of the code were still skipping
/dev mounts even in VFS2, causing the loader to panic when it ran short
of FDs to connect to the gofer.
PiperOrigin-RevId: 365858436
Diffstat (limited to 'runsc/container')
-rw-r--r-- | runsc/container/container.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/container/container.go b/runsc/container/container.go index f9d83c118..e72ada311 100644 --- a/runsc/container/container.go +++ b/runsc/container/container.go @@ -886,7 +886,7 @@ func (c *Container) createGoferProcess(spec *specs.Spec, conf *config.Config, bu // Add root mount and then add any other additional mounts. mountCount := 1 for _, m := range spec.Mounts { - if specutils.Is9PMount(m) { + if specutils.Is9PMount(m, conf.VFS2) { mountCount++ } } |