From 6593fd32d71a33f76462f347ef263e26600d998e Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Thu, 28 Jan 2021 23:04:10 -0800 Subject: pkg/build/openbsd: sync before umount (#2414) Reported-by: syzbot+badc83af4aac6e58c236@syzkaller.appspotmail.com --- pkg/build/openbsd.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg') diff --git a/pkg/build/openbsd.go b/pkg/build/openbsd.go index d09427849..a47579035 100644 --- a/pkg/build/openbsd.go +++ b/pkg/build/openbsd.go @@ -81,6 +81,7 @@ func (ctx openbsd) copyFilesToImage(overlayDir, outputDir string) error { script := fmt.Sprintf(`set -eux OVERLAY="%s" # Cleanup in case something failed before. +sync doas umount /altroot || true doas vnconfig -u vnd0 || true @@ -88,6 +89,7 @@ doas /sbin/vnconfig vnd0 image doas mount /dev/vnd0a /altroot doas cp kernel /altroot/bsd test -d "$OVERLAY" && doas cp -Rf "$OVERLAY"/. /altroot +sync doas umount /altroot doas vnconfig -u vnd0 `, overlayDir) -- cgit mrf-deployment