Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Fix pasto in previous -- pass the right size to mem...



details:   https://anonhg.NetBSD.org/src/rev/eec85747bdc6
branches:  trunk
changeset: 937934:eec85747bdc6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Aug 28 22:27:51 2020 +0000

description:
Fix pasto in previous -- pass the right size to memset...

diffstat:

 sys/kern/kern_proc.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 6b3994ce4afe -r eec85747bdc6 sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c      Fri Aug 28 22:02:24 2020 +0000
+++ b/sys/kern/kern_proc.c      Fri Aug 28 22:27:51 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_proc.c,v 1.258 2020/08/28 21:39:56 riastradh Exp $        */
+/*     $NetBSD: kern_proc.c,v 1.259 2020/08/28 22:27:51 riastradh Exp $        */
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.258 2020/08/28 21:39:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.259 2020/08/28 22:27:51 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -2576,10 +2576,10 @@
 fill_proc(const struct proc *psrc, struct proc *p, bool allowaddr)
 {
        COND_SET_STRUCT(p->p_list, psrc->p_list, allowaddr);
-       memset(&p->p_auxlock, 0, allowaddr);
+       memset(&p->p_auxlock, 0, sizeof(p->p_auxlock));
        COND_SET_STRUCT(p->p_lock, psrc->p_lock, allowaddr);
-       memset(&p->p_stmutex, 0, allowaddr);
-       memset(&p->p_reflock, 0, allowaddr);
+       memset(&p->p_stmutex, 0, sizeof(p->p_stmutex));
+       memset(&p->p_reflock, 0, sizeof(p->p_reflock));
        COND_SET_STRUCT(p->p_waitcv, psrc->p_waitcv, allowaddr);
        COND_SET_STRUCT(p->p_lwpcv, psrc->p_lwpcv, allowaddr);
        COND_SET_PTR(p->p_cred, psrc->p_cred, allowaddr);
@@ -2591,7 +2591,7 @@
        COND_SET_PTR(p->p_sigacts, psrc->p_sigacts, allowaddr);
        COND_SET_PTR(p->p_aio, psrc->p_aio, allowaddr);
        p->p_mqueue_cnt = psrc->p_mqueue_cnt;
-       memset(&p->p_specdataref, 0, allowaddr);
+       memset(&p->p_specdataref, 0, sizeof(p->p_specdataref));
        p->p_exitsig = psrc->p_exitsig;
        p->p_flag = psrc->p_flag;
        p->p_sflag = psrc->p_sflag;



Home | Main Index | Thread Index | Old Index