diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-07-21 19:58:58 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-07-21 19:58:58 +0000 |
commit | 731fc02ec070137336c4af6665d0d4d69b3bf05e (patch) | |
tree | 09d7cd25b95431892ea4f596ba55396424bc0ad7 /pkg/sentry | |
parent | c48157c8dc61e357a2b896ea748dc593c3408e5b (diff) | |
parent | a89b2f005b714dbe472ebda702020bb6fb1d9c0a (diff) |
Merge release-20210712.0-36-ga89b2f005 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/fsimpl/tmpfs/tmpfs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/tmpfs.go b/pkg/sentry/fsimpl/tmpfs/tmpfs.go index 79a54eef3..f2250c025 100644 --- a/pkg/sentry/fsimpl/tmpfs/tmpfs.go +++ b/pkg/sentry/fsimpl/tmpfs/tmpfs.go @@ -397,8 +397,8 @@ func (i *inode) init(impl interface{}, fs *filesystem, kuid auth.KUID, kgid auth } // Inherit the group and setgid bit as in fs/inode.c:inode_init_owner(). - if parentDir != nil && parentDir.inode.mode&linux.S_ISGID == linux.S_ISGID { - kgid = auth.KGID(parentDir.inode.gid) + if parentDir != nil && atomic.LoadUint32(&parentDir.inode.mode)&linux.S_ISGID == linux.S_ISGID { + kgid = auth.KGID(atomic.LoadUint32(&parentDir.inode.gid)) if mode&linux.S_IFDIR == linux.S_IFDIR { mode |= linux.S_ISGID } |