summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel
diff options
context:
space:
mode:
authorZhaozhong Ni <nzz@google.com>2018-05-08 11:36:11 -0700
committerShentubot <shentubot@google.com>2018-05-08 11:36:59 -0700
commit174161013de22be6a42b02ee06611a9de9e20b18 (patch)
treeb910f76ea3ba8b14a29df2d28010fd0af1db18bb /pkg/sentry/kernel
parent3ac3ea1d6afea0b128112e6a46b8bf47b4b0e02a (diff)
Capture restore file system corruption errors in exit error.
PiperOrigin-RevId: 195850822 Change-Id: I4d7bdd8fe129c5ed461b73e1d7458be2cf5680c2
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r--pkg/sentry/kernel/kernel.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go
index 25c8dd885..536461bbd 100644
--- a/pkg/sentry/kernel/kernel.go
+++ b/pkg/sentry/kernel/kernel.go
@@ -418,7 +418,9 @@ func (k *Kernel) LoadFrom(r io.Reader, p platform.Platform, net inet.Stack) erro
// Ensure that all pending asynchronous work is complete:
// - namedpipe opening
// - inode file opening
- fs.AsyncBarrier()
+ if err := fs.AsyncErrorBarrier(); err != nil {
+ return err
+ }
log.Infof("Overall load took [%s]", time.Since(loadStart))