aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_acct.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-07-23 14:29:57 +0000
committerMark Johnston <markj@FreeBSD.org>2021-07-30 00:32:58 +0000
commitfdeacf8fdf653805084d6a72292f902ed019ef23 (patch)
tree9ad91be0e5aabbf7951a6cd4ba1c5ccba4d49240 /sys/kern/kern_acct.c
parenta67749ac451e1ca22bde3c2a63db9ec0e962aa21 (diff)
downloadsrc-fdeacf8fdf653805084d6a72292f902ed019ef23.tar.gz
src-fdeacf8fdf653805084d6a72292f902ed019ef23.zip
acct: Zero pad bytes in accounting records
Reported by: KMSAN Sponsored by: The FreeBSD Foundation (cherry picked from commit 90959dd1e50ee820e84bed4bc63fbed140298441)
Diffstat (limited to 'sys/kern/kern_acct.c')
-rw-r--r--sys/kern/kern_acct.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 4c1efada10da..ad272676083e 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -349,6 +349,8 @@ acct_process(struct thread *td)
if (acct_vp == NULL || acct_suspended)
return (0);
+ memset(&acct, 0, sizeof(acct));
+
sx_slock(&acct_sx);
/*