git: fdeacf8fdf65 - stable/13 - acct: Zero pad bytes in accounting records

Mark Johnston markj at FreeBSD.org
Fri Jul 30 00:33:17 UTC 2021


The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=fdeacf8fdf653805084d6a72292f902ed019ef23

commit fdeacf8fdf653805084d6a72292f902ed019ef23
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-07-23 14:29:57 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-07-30 00:32:58 +0000

    acct: Zero pad bytes in accounting records
    
    Reported by:    KMSAN
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 90959dd1e50ee820e84bed4bc63fbed140298441)
---
 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);
 
 	/*


More information about the dev-commits-src-all mailing list