summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/timerfd
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-10-12 17:29:59 +0000
committergVisor bot <gvisor-bot@google.com>2021-10-12 17:29:59 +0000
commitb8c205542c13df2b97629e6235eb8656c55494dd (patch)
tree827ec99fd04d0739cfd7c2958586b1e2f4345457 /pkg/sentry/fs/timerfd
parenta77fbc58b6782b28d2462b62f49f56c6d0f17cc3 (diff)
parent8682ce689e928ec32ec810a7eb038fb582c66093 (diff)
Merge release-20210927.0-60-g8682ce689 (automated)
Diffstat (limited to 'pkg/sentry/fs/timerfd')
-rw-r--r--pkg/sentry/fs/timerfd/timerfd.go2
-rw-r--r--pkg/sentry/fs/timerfd/timerfd_state_autogen.go14
2 files changed, 8 insertions, 8 deletions
diff --git a/pkg/sentry/fs/timerfd/timerfd.go b/pkg/sentry/fs/timerfd/timerfd.go
index 1c8518d71..ca8be8683 100644
--- a/pkg/sentry/fs/timerfd/timerfd.go
+++ b/pkg/sentry/fs/timerfd/timerfd.go
@@ -43,7 +43,7 @@ type TimerOperations struct {
fsutil.FileNoopFlush `state:"nosave"`
fsutil.FileUseInodeUnstableAttr `state:"nosave"`
- events waiter.Queue `state:"zerovalue"`
+ events waiter.Queue
timer *ktime.Timer
// val is the number of timer expirations since the last successful call to
diff --git a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go
index 822eecdd6..6cab87796 100644
--- a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go
+++ b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go
@@ -12,6 +12,7 @@ func (t *TimerOperations) StateTypeName() string {
func (t *TimerOperations) StateFields() []string {
return []string{
+ "events",
"timer",
"val",
}
@@ -22,19 +23,18 @@ func (t *TimerOperations) beforeSave() {}
// +checklocksignore
func (t *TimerOperations) StateSave(stateSinkObject state.Sink) {
t.beforeSave()
- if !state.IsZeroValue(&t.events) {
- state.Failf("events is %#v, expected zero", &t.events)
- }
- stateSinkObject.Save(0, &t.timer)
- stateSinkObject.Save(1, &t.val)
+ stateSinkObject.Save(0, &t.events)
+ stateSinkObject.Save(1, &t.timer)
+ stateSinkObject.Save(2, &t.val)
}
func (t *TimerOperations) afterLoad() {}
// +checklocksignore
func (t *TimerOperations) StateLoad(stateSourceObject state.Source) {
- stateSourceObject.Load(0, &t.timer)
- stateSourceObject.Load(1, &t.val)
+ stateSourceObject.Load(0, &t.events)
+ stateSourceObject.Load(1, &t.timer)
+ stateSourceObject.Load(2, &t.val)
}
func init() {