summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2021-03-30 11:35:03 -0700
committergVisor bot <gvisor-bot@google.com>2021-03-30 11:36:55 -0700
commit71f3dccbb3d47cbf572afe0737a29c8d87fde9c9 (patch)
tree9b829889119c9abaf0b764ccbc9b015121054366 /runsc/boot
parent8a2f7e716dcc62f04d2808e8ade34941c94fc956 (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/boot')
-rw-r--r--runsc/boot/fs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index 32adde643..19ced9b0e 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -110,7 +110,7 @@ func compileMounts(spec *specs.Spec, vfs2Enabled bool) []specs.Mount {
// Mount all submounts from the spec.
for _, m := range spec.Mounts {
- if !vfs2Enabled && !specutils.IsVFS1SupportedDevMount(m) {
+ if !specutils.IsSupportedDevMount(m, vfs2Enabled) {
log.Warningf("ignoring dev mount at %q", m.Destination)
continue
}