diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-06-14 01:48:32 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-14 01:48:32 +0000 |
commit | 58aedc71d875019d345efc73e3ea42327e71fbf9 (patch) | |
tree | c71d4648af932990630151785bc205627c52dfa8 /pkg/sentry/loader/vdso.go | |
parent | dacee8d694b063ece50e6b3cc5f227dcc1c2f2e9 (diff) | |
parent | 3e9b8ecbfe21ba6c8c788be469fc6cea6a4a40b7 (diff) |
Merge 3e9b8ecb (automated)
Diffstat (limited to 'pkg/sentry/loader/vdso.go')
-rw-r--r-- | pkg/sentry/loader/vdso.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/sentry/loader/vdso.go b/pkg/sentry/loader/vdso.go index 4ba56c44d..ada28aea3 100644 --- a/pkg/sentry/loader/vdso.go +++ b/pkg/sentry/loader/vdso.go @@ -69,11 +69,12 @@ type byteReader struct { var _ fs.FileOperations = (*byteReader)(nil) // newByteReaderFile creates a fake file to read data from. -func newByteReaderFile(data []byte) *fs.File { +func newByteReaderFile(ctx context.Context, data []byte) *fs.File { // Create a fake inode. inode := fs.NewInode( + ctx, &fsutil.SimpleFileInode{}, - fs.NewPseudoMountSource(), + fs.NewPseudoMountSource(ctx), fs.StableAttr{ Type: fs.Anonymous, DeviceID: anon.PseudoDevice.DeviceID(), @@ -219,8 +220,8 @@ type VDSO struct { // PrepareVDSO validates the system VDSO and returns a VDSO, containing the // param page for updating by the kernel. -func PrepareVDSO(mfp pgalloc.MemoryFileProvider) (*VDSO, error) { - vdsoFile := newByteReaderFile(vdsoBin) +func PrepareVDSO(ctx context.Context, mfp pgalloc.MemoryFileProvider) (*VDSO, error) { + vdsoFile := newByteReaderFile(ctx, vdsoBin) // First make sure the VDSO is valid. vdsoFile does not use ctx, so a // nil context can be passed. |