mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix mount promise path resolution.
It should build a path starting from the task root, not rp.root. This was a problem in the case of reading from /proc/mountinfo before starting the daemon. In this case, the procfs issues a StatAt call through vfs with the rp starting at the root of the cloudsql mount. This issued a request to start the daemon with the path "/" instead of "/cloudsql". PiperOrigin-RevId: 572713014
This commit is contained in:
committed by
gVisor bot
parent
a8bc2e1466
commit
1f04a514e8
@@ -947,7 +947,9 @@ func (vfs *VirtualFilesystem) maybeBlockOnMountPromise(ctx context.Context, rp *
|
||||
return
|
||||
}
|
||||
|
||||
path, err := vfs.PathnameReachable(ctx, rp.root, vd)
|
||||
root := RootFromContext(ctx)
|
||||
defer root.DecRef(ctx)
|
||||
path, err := vfs.PathnameReachable(ctx, root, vd)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("could not reach %v from root", rp.Component()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user