summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/proc
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-05-03 20:54:38 +0000
committergVisor bot <gvisor-bot@google.com>2021-05-03 20:54:38 +0000
commit7e08899808dd1fb223add55875237e9389268e21 (patch)
tree2dfd65bb5b74a2058996df6d43400d155f196740 /pkg/sentry/fsimpl/proc
parentc8eee758e7e9ed96c651d4b002f720eaccc65db4 (diff)
parent1947c873423cabcaf5e67b667542421ade7414ff (diff)
Merge release-20210419.0-52-g1947c8734 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/proc')
-rw-r--r--pkg/sentry/fsimpl/proc/task_fds.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/proc/task_fds.go b/pkg/sentry/fsimpl/proc/task_fds.go
index 02bf74dbc..4718fac7a 100644
--- a/pkg/sentry/fsimpl/proc/task_fds.go
+++ b/pkg/sentry/fsimpl/proc/task_fds.go
@@ -221,6 +221,8 @@ func (s *fdSymlink) Readlink(ctx context.Context, _ *vfs.Mount) (string, error)
defer file.DecRef(ctx)
root := vfs.RootFromContext(ctx)
defer root.DecRef(ctx)
+
+ // Note: it's safe to reenter kernfs from Readlink if needed to resolve path.
return s.task.Kernel().VFS().PathnameWithDeleted(ctx, root, file.VirtualDentry())
}