diff options
author | Adin Scannell <ascannell@google.com> | 2020-02-11 11:37:12 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-11 11:38:08 -0800 |
commit | 115898e368e4afe5418a7290d9545fafc7f6f25e (patch) | |
tree | 0ab934bbf1753fec1b337db71d882d23a975e5bb /pkg/sentry/fs | |
parent | 762e4761cc4edd92108f6836ad1933c7158b8be8 (diff) |
Prevent DATA RACE in UnstableAttr.
The slaveInodeOperations is currently copying the object when
truncate is called (which is a no-op). This may result in a
(unconsequential) data race when being modified concurrently.
PiperOrigin-RevId: 294484276
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r-- | pkg/sentry/fs/tty/slave.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fs/tty/slave.go b/pkg/sentry/fs/tty/slave.go index db55cdc48..6a2dbc576 100644 --- a/pkg/sentry/fs/tty/slave.go +++ b/pkg/sentry/fs/tty/slave.go @@ -73,7 +73,7 @@ func (si *slaveInodeOperations) Release(ctx context.Context) { } // Truncate implements fs.InodeOperations.Truncate. -func (slaveInodeOperations) Truncate(context.Context, *fs.Inode, int64) error { +func (*slaveInodeOperations) Truncate(context.Context, *fs.Inode, int64) error { return nil } |