summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-01-17 22:33:57 +0000
committergVisor bot <gvisor-bot@google.com>2020-01-17 22:33:57 +0000
commit0fd6493d498b044fa37d33d3f2c0b0e1f0b80dc6 (patch)
treec49d67367ab2eb25e347bf346f1180b048451be9 /pkg/sentry/fs
parent93888366e19a6a5eb4382de771ddae1efcb1a972 (diff)
parentf1a5178c589dbd9a1fe4f1b9fb943fbe64791b58 (diff)
Merge release-20200115.0-32-gf1a5178 (automated)
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r--pkg/sentry/fs/mounts.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/sentry/fs/mounts.go b/pkg/sentry/fs/mounts.go
index db3dfd096..a9627a9d1 100644
--- a/pkg/sentry/fs/mounts.go
+++ b/pkg/sentry/fs/mounts.go
@@ -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
}