summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/tmpfs
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-11-13 08:51:38 +0000
committergVisor bot <gvisor-bot@google.com>2020-11-13 08:51:38 +0000
commit5432054ffc736b2a5b7bb3dde8d6a2b962e7302c (patch)
treeec3ee5f0c285234473406bf1efd94d3e750ffd6e /pkg/sentry/fsimpl/tmpfs
parent7969d9dcecb96b3aebc28dfa5ee51ac7e36c9350 (diff)
parentcc1b20590cf4505e04b8c221d1d950e45110f5f0 (diff)
Merge release-20201030.0-85-gcc1b20590 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs')
-rw-r--r--pkg/sentry/fsimpl/tmpfs/tmpfs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/tmpfs.go b/pkg/sentry/fsimpl/tmpfs/tmpfs.go
index c5a131d5d..0c9c639d3 100644
--- a/pkg/sentry/fsimpl/tmpfs/tmpfs.go
+++ b/pkg/sentry/fsimpl/tmpfs/tmpfs.go
@@ -631,7 +631,8 @@ func (i *inode) direntType() uint8 {
}
func (i *inode) isDir() bool {
- return linux.FileMode(i.mode).FileType() == linux.S_IFDIR
+ mode := linux.FileMode(atomic.LoadUint32(&i.mode))
+ return mode.FileType() == linux.S_IFDIR
}
func (i *inode) touchAtime(mnt *vfs.Mount) {