diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2019-12-19 14:29:57 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-19 14:34:53 -0800 |
commit | bb00438f36ebd19968246a838c2ddd61b9e14b79 (patch) | |
tree | 8fe603b6bb5f22c96a23551cbedf2e158cf3e88b /pkg/sentry/fs | |
parent | 57ce26c0b465dce332a59c9fabb05f737ff4241d (diff) |
Make masterInodeOperations.Truncate take a pointer receiver.
Otherwise a copy happens, which triggers a data race when reading
masterInodeOperations.SimpleFileOperations.uattr, which must be accessed with a
lock held.
PiperOrigin-RevId: 286464473
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r-- | pkg/sentry/fs/tty/master.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fs/tty/master.go b/pkg/sentry/fs/tty/master.go index 934828c12..6b07f6bf2 100644 --- a/pkg/sentry/fs/tty/master.go +++ b/pkg/sentry/fs/tty/master.go @@ -77,7 +77,7 @@ func (mi *masterInodeOperations) Release(ctx context.Context) { } // Truncate implements fs.InodeOperations.Truncate. -func (masterInodeOperations) Truncate(context.Context, *fs.Inode, int64) error { +func (*masterInodeOperations) Truncate(context.Context, *fs.Inode, int64) error { return nil } |