Automated rollback of changelist 691984293

PiperOrigin-RevId: 715964287
This commit is contained in:
Nicolas Lacasse
2025-01-15 15:16:06 -08:00
committed by gVisor bot
parent 4394801ae6
commit 689db80e98
+8 -15
View File
@@ -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
}