Module Name: src Committed By: skrll Date: Sat Feb 25 08:41:37 UTC 2023
Modified Files: src/sys/arch/mips/mips: vm_machdep.c Log Message: Convert some assignments into KASSERTs. l_md is zeroised by lwp_create with memset(&l2->l_startzero, 0, sizeof(*l2) - offsetof(lwp_t, l_startzero)); To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/arch/mips/mips/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.165 src/sys/arch/mips/mips/vm_machdep.c:1.166 --- src/sys/arch/mips/mips/vm_machdep.c:1.165 Thu Sep 29 07:00:46 2022 +++ src/sys/arch/mips/mips/vm_machdep.c Sat Feb 25 08:41:37 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.165 2022/09/29 07:00:46 skrll Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.166 2023/02/25 08:41:37 skrll Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.165 2022/09/29 07:00:46 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.166 2023/02/25 08:41:37 skrll Exp $"); #include "opt_ddb.h" #include "opt_cputype.h" @@ -93,9 +93,9 @@ cpu_lwp_fork(struct lwp *l1, struct lwp KASSERT(l1 == curlwp || l1 == &lwp0); - l2->l_md.md_ss_addr = 0; - l2->l_md.md_ss_instr = 0; - l2->l_md.md_astpending = 0; + KASSERT(l2->l_md.md_ss_addr == 0); + KASSERT(l2->l_md.md_ss_instr == 0); + KASSERT(l2->l_md.md_astpending == 0); /* Copy the PCB from parent. */ *pcb2 = *pcb1;