diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-03 20:39:15 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-03 20:39:15 +0000 |
commit | 5dc426b55a2b3f695303aa76a3294585a0b32168 (patch) | |
tree | b86d9c4c87cdd163af284499076a589f0de25d86 /pkg/sentry/fs/proc/mounts.go | |
parent | ea213f005adb71369f5a32cc38b096179f20ea8d (diff) | |
parent | b2ae7ea1bb207eddadd7962080e7bd0b8634db96 (diff) |
Merge release-20200622.1-313-gb2ae7ea1b (automated)
Diffstat (limited to 'pkg/sentry/fs/proc/mounts.go')
-rw-r--r-- | pkg/sentry/fs/proc/mounts.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/fs/proc/mounts.go b/pkg/sentry/fs/proc/mounts.go index 1fc9c703c..6a63c47b3 100644 --- a/pkg/sentry/fs/proc/mounts.go +++ b/pkg/sentry/fs/proc/mounts.go @@ -47,7 +47,7 @@ func forEachMount(t *kernel.Task, fn func(string, *fs.Mount)) { // The task has been destroyed. Nothing to show here. return } - defer rootDir.DecRef() + defer rootDir.DecRef(t) mnt := t.MountNamespace().FindMount(rootDir) if mnt == nil { @@ -64,7 +64,7 @@ func forEachMount(t *kernel.Task, fn func(string, *fs.Mount)) { continue // No longer valid. } mountPath, desc := mroot.FullName(rootDir) - mroot.DecRef() + mroot.DecRef(t) if !desc { // MountSources that are not descendants of the chroot jail are ignored. continue @@ -97,7 +97,7 @@ func (mif *mountInfoFile) ReadSeqFileData(ctx context.Context, handle seqfile.Se if mroot == nil { return // No longer valid. } - defer mroot.DecRef() + defer mroot.DecRef(ctx) // Format: // 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue @@ -216,7 +216,7 @@ func (mf *mountsFile) ReadSeqFileData(ctx context.Context, handle seqfile.SeqHan if root == nil { return // No longer valid. } - defer root.DecRef() + defer root.DecRef(ctx) flags := root.Inode.MountSource.Flags opts := "rw" |