From 90959dd1e50ee820e84bed4bc63fbed140298441 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 23 Jul 2021 10:29:57 -0400 Subject: [PATCH] acct: Zero pad bytes in accounting records Reported by: KMSAN MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/kern/kern_acct.c | 2 ++ 1 file changed, 2 insertions(+) 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); /*