diff --git a/pkg/sentry/vfs/mount.go b/pkg/sentry/vfs/mount.go index 615368957..84d5c7b21 100644 --- a/pkg/sentry/vfs/mount.go +++ b/pkg/sentry/vfs/mount.go @@ -1369,20 +1369,17 @@ func (vfs *VirtualFilesystem) GenerateProcMounts(ctx context.Context, taskRootDi mount: mnt, dentry: mnt.root, } - if mp := vfs.getMountPromise(mntRootVD); mp != nil && !mp.resolved.Load() { - // Skip unresolved mount promises for consistency with - // GenerateProcMountInfo. - continue - } path, err := vfs.PathnameReachable(ctx, taskRootDir, mntRootVD) if err != nil { - // For some reason we didn't get a path. + // For some reason we didn't get a path. Log a warning + // and run with empty path. ctx.Warningf("VFS.GenerateProcMounts: error getting pathname for mount root: %v", err) - continue + path = "" } if path == "" { - // The path is not reachable from root. - continue + // Either an error occurred, or path is not reachable + // from root. + break } mntOpts := mnt.Options() @@ -1443,14 +1440,10 @@ func (vfs *VirtualFilesystem) GenerateProcMountInfo(ctx context.Context, taskRoo mount: mnt, dentry: mnt.root, } - if mp := vfs.getMountPromise(mntRootVD); mp != nil && !mp.resolved.Load() { - // Skip unresolved mount promises to prevent mounters from - // deadlocking by reading /proc/*/mountinfo. - continue - } pathFromRoot, err := vfs.PathnameReachable(ctx, taskRootDir, mntRootVD) if err != nil { - // For some reason we didn't get a path. + // For some reason we didn't get a path. Log a warning + // and run with empty path. ctx.Warningf("VFS.GenerateProcMountInfo: error getting pathname for mount root: %v", err) continue }