Skip to content

Commit 689db80

Browse files
nlacassegvisor-bot
authored andcommitted
Automated rollback of changelist 691984293
PiperOrigin-RevId: 715964287
1 parent 4394801 commit 689db80

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

pkg/sentry/vfs/mount.go

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,20 +1369,17 @@ func (vfs *VirtualFilesystem) GenerateProcMounts(ctx context.Context, taskRootDi
13691369
mount: mnt,
13701370
dentry: mnt.root,
13711371
}
1372-
if mp := vfs.getMountPromise(mntRootVD); mp != nil && !mp.resolved.Load() {
1373-
// Skip unresolved mount promises for consistency with
1374-
// GenerateProcMountInfo.
1375-
continue
1376-
}
13771372
path, err := vfs.PathnameReachable(ctx, taskRootDir, mntRootVD)
13781373
if err != nil {
1379-
// For some reason we didn't get a path.
1374+
// For some reason we didn't get a path. Log a warning
1375+
// and run with empty path.
13801376
ctx.Warningf("VFS.GenerateProcMounts: error getting pathname for mount root: %v", err)
1381-
continue
1377+
path = ""
13821378
}
13831379
if path == "" {
1384-
// The path is not reachable from root.
1385-
continue
1380+
// Either an error occurred, or path is not reachable
1381+
// from root.
1382+
break
13861383
}
13871384

13881385
mntOpts := mnt.Options()
@@ -1443,14 +1440,10 @@ func (vfs *VirtualFilesystem) GenerateProcMountInfo(ctx context.Context, taskRoo
14431440
mount: mnt,
14441441
dentry: mnt.root,
14451442
}
1446-
if mp := vfs.getMountPromise(mntRootVD); mp != nil && !mp.resolved.Load() {
1447-
// Skip unresolved mount promises to prevent mounters from
1448-
// deadlocking by reading /proc/*/mountinfo.
1449-
continue
1450-
}
14511443
pathFromRoot, err := vfs.PathnameReachable(ctx, taskRootDir, mntRootVD)
14521444
if err != nil {
1453-
// For some reason we didn't get a path.
1445+
// For some reason we didn't get a path. Log a warning
1446+
// and run with empty path.
14541447
ctx.Warningf("VFS.GenerateProcMountInfo: error getting pathname for mount root: %v", err)
14551448
continue
14561449
}

0 commit comments

Comments
 (0)