summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-26 20:26:42 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-26 20:26:42 +0000
commitc67edcefda27e4413eb7949343293234fbe1f825 (patch)
tree20a5d47514f209c9656a16be510032601a7d871f /pkg/sentry
parenta76428e5bbc73156044aabddaa2b495f57c64609 (diff)
parent96bd076e8a002ccacc414e92c83dedf2e35ca07b (diff)
Merge release-20210112.0-94-g96bd076e8 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/fsimpl/gofer/directory.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/gofer/directory.go b/pkg/sentry/fsimpl/gofer/directory.go
index 3b5927702..9da01cba3 100644
--- a/pkg/sentry/fsimpl/gofer/directory.go
+++ b/pkg/sentry/fsimpl/gofer/directory.go
@@ -90,6 +90,7 @@ type createSyntheticOpts struct {
// * d.isDir().
// * d does not already contain a child with the given name.
func (d *dentry) createSyntheticChildLocked(opts *createSyntheticOpts) {
+ now := d.fs.clock.Now().Nanoseconds()
child := &dentry{
refs: 1, // held by d
fs: d.fs,
@@ -98,6 +99,10 @@ func (d *dentry) createSyntheticChildLocked(opts *createSyntheticOpts) {
uid: uint32(opts.kuid),
gid: uint32(opts.kgid),
blockSize: usermem.PageSize, // arbitrary
+ atime: now,
+ mtime: now,
+ ctime: now,
+ btime: now,
readFD: -1,
writeFD: -1,
mmapFD: -1,