mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix data race in MountNamespace.resolve.
We must hold fs.renameMu to access Dirent.parent. PiperOrigin-RevId: 290340804
This commit is contained in:
committed by
gVisor bot
parent
9073521098
commit
f1a5178c58
@@ -609,8 +609,11 @@ func (mns *MountNamespace) resolve(ctx context.Context, root, node *Dirent, rema
|
||||
}
|
||||
|
||||
// Find the node; we resolve relative to the current symlink's parent.
|
||||
renameMu.RLock()
|
||||
parent := node.parent
|
||||
renameMu.RUnlock()
|
||||
*remainingTraversals--
|
||||
d, err := mns.FindInode(ctx, root, node.parent, targetPath, remainingTraversals)
|
||||
d, err := mns.FindInode(ctx, root, parent, targetPath, remainingTraversals)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user