aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-07-23 16:04:02 +0000
committerMark Johnston <markj@FreeBSD.org>2021-07-30 00:32:58 +0000
commita67749ac451e1ca22bde3c2a63db9ec0e962aa21 (patch)
tree5c6686c212fc3f92bf8850405f3385d667f64bf5
parentb76e41fca95f189a1bc759f3318c96ff8653ba01 (diff)
downloadsrc-a67749ac451e1ca22bde3c2a63db9ec0e962aa21.tar.gz
src-a67749ac451e1ca22bde3c2a63db9ec0e962aa21.zip
vfs: Initialize "lastfail" in vfs_mountroot_wait()
This variable is only used to rate-limit "Root mount waiting for: ..." messages using ppsratecheck(). Reported by: KMSAN Sponsored by: The FreeBSD Foundation (cherry picked from commit 048cd371f3d793fa354f1d3a1d484bc2725a3fc1)
-rw-r--r--sys/kern/vfs_mountroot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index 3b968fd19bbd..a34ae3fe06e3 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -982,6 +982,7 @@ vfs_mountroot_wait(void)
TSENTER();
curfail = 0;
+ lastfail.tv_sec = 0;
while (1) {
g_waitidle();
mtx_lock(&root_holds_mtx);