summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/proc/proc.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2019-06-13 18:39:43 -0700
committerShentubot <shentubot@google.com>2019-06-13 18:40:38 -0700
commit3e9b8ecbfe21ba6c8c788be469fc6cea6a4a40b7 (patch)
tree8a1b2a0e64c013503ff30bf4b49b28764db52680 /pkg/sentry/fs/proc/proc.go
parent0a5ee6f7b20ef4f5533766d753b85005f79ae613 (diff)
Plumb context through more layers of filesytem.
All functions which allocate objects containing AtomicRefCounts will soon need a context. PiperOrigin-RevId: 253147709
Diffstat (limited to 'pkg/sentry/fs/proc/proc.go')
-rw-r--r--pkg/sentry/fs/proc/proc.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/fs/proc/proc.go b/pkg/sentry/fs/proc/proc.go
index 170e2af4f..0ef13f2f5 100644
--- a/pkg/sentry/fs/proc/proc.go
+++ b/pkg/sentry/fs/proc/proc.go
@@ -68,7 +68,7 @@ func New(ctx context.Context, msrc *fs.MountSource, cgroupControllers map[string
"filesystems": seqfile.NewSeqFileInode(ctx, &filesystemsData{}, msrc),
"loadavg": seqfile.NewSeqFileInode(ctx, &loadavgData{}, msrc),
"meminfo": seqfile.NewSeqFileInode(ctx, &meminfoData{k}, msrc),
- "mounts": newProcInode(ramfs.NewSymlink(ctx, fs.RootOwner, "self/mounts"), msrc, fs.Symlink, nil),
+ "mounts": newProcInode(ctx, ramfs.NewSymlink(ctx, fs.RootOwner, "self/mounts"), msrc, fs.Symlink, nil),
"self": newSelf(ctx, pidns, msrc),
"stat": seqfile.NewSeqFileInode(ctx, &statData{k}, msrc),
"thread-self": newThreadSelf(ctx, pidns, msrc),
@@ -94,7 +94,7 @@ func New(ctx context.Context, msrc *fs.MountSource, cgroupControllers map[string
p.AddChild(ctx, "net", p.newNetDir(ctx, k, msrc))
}
- return newProcInode(p, msrc, fs.SpecialDirectory, nil), nil
+ return newProcInode(ctx, p, msrc, fs.SpecialDirectory, nil), nil
}
// self is a magical link.
@@ -112,7 +112,7 @@ func newSelf(ctx context.Context, pidns *kernel.PIDNamespace, msrc *fs.MountSour
Symlink: *ramfs.NewSymlink(ctx, fs.RootOwner, ""),
pidns: pidns,
}
- return newProcInode(s, msrc, fs.Symlink, nil)
+ return newProcInode(ctx, s, msrc, fs.Symlink, nil)
}
// newThreadSelf returns a new "threadSelf" node.
@@ -121,7 +121,7 @@ func newThreadSelf(ctx context.Context, pidns *kernel.PIDNamespace, msrc *fs.Mou
Symlink: *ramfs.NewSymlink(ctx, fs.RootOwner, ""),
pidns: pidns,
}
- return newProcInode(s, msrc, fs.Symlink, nil)
+ return newProcInode(ctx, s, msrc, fs.Symlink, nil)
}
// Readlink implements fs.InodeOperations.Readlink.
@@ -185,7 +185,7 @@ func (p *proc) Lookup(ctx context.Context, dir *fs.Inode, name string) (*fs.Dire
// Wrap it in a taskDir.
td := p.newTaskDir(otherTask, dir.MountSource, true)
- return fs.NewDirent(td, name), nil
+ return fs.NewDirent(ctx, td, name), nil
}
// GetFile implements fs.InodeOperations.