diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-26 04:06:56 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-26 04:06:56 +0000 |
commit | 68eb313a6da88ae9192571d7f08f7a7dbeb495e1 (patch) | |
tree | 6974dbdb721bfa0a8b2ada517f435f2cad2aa4f1 /pkg/sentry/fsimpl/proc/tasks.go | |
parent | 11be6aad17d54dc7085ba4e585f37d54a89f0cf5 (diff) | |
parent | df3c105f49865a48f0c07c79ab84b1bf351a49f8 (diff) |
Merge release-20200818.0-56-gdf3c105f4 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/proc/tasks.go')
-rw-r--r-- | pkg/sentry/fsimpl/proc/tasks.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/proc/tasks.go b/pkg/sentry/fsimpl/proc/tasks.go index 1391992b7..863c4467e 100644 --- a/pkg/sentry/fsimpl/proc/tasks.go +++ b/pkg/sentry/fsimpl/proc/tasks.go @@ -37,6 +37,7 @@ const ( // // +stateify savable type tasksInode struct { + tasksInodeRefs kernfs.InodeNotSymlink kernfs.InodeDirectoryNoNewChildren kernfs.InodeAttrs @@ -84,6 +85,7 @@ func (fs *filesystem) newTasksInode(k *kernel.Kernel, pidns *kernel.PIDNamespace cgroupControllers: cgroupControllers, } inode.InodeAttrs.Init(root, linux.UNNAMED_MAJOR, fs.devMinor, fs.NextIno(), linux.ModeDirectory|0555) + inode.EnableLeakCheck() dentry := &kernfs.Dentry{} dentry.Init(inode) @@ -226,6 +228,11 @@ func (i *tasksInode) Stat(ctx context.Context, vsfs *vfs.Filesystem, opts vfs.St return stat, nil } +// DecRef implements kernfs.Inode. +func (i *tasksInode) DecRef(context.Context) { + i.tasksInodeRefs.DecRef(i.Destroy) +} + // staticFileSetStat implements a special static file that allows inode // attributes to be set. This is to support /proc files that are readonly, but // allow attributes to be set. |