Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Oct 2000 10:31:51 -0400 (EDT)
From:      josh@zipperup.org
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        dwmalone@freebsd.org, marcel@freebsd.org
Subject:   kern/22189: Patch to sys/compat/linux to add M_ZERO to appropriate malloc calls
Message-ID:  <20001021143151.D09C23D1D@mail.snickers.org>

next in thread | raw e-mail | index | archive | help

>Number:         22189
>Category:       kern
>Synopsis:       Patch to sys/compat/linux to add M_ZERO to appropriate malloc calls
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 21 07:40:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Josh Tiefenbach
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Connective Software
>Environment:

	-current circa 20 Oct 2000

>Description:

	Patch to convert malloc/bzero calls to malloc(..., M_ZERO) calls,
	as per phk's email to freebsd-current.

	Changes were made with the goal of keeping the semantics of the
	code the same in mind. If there was any doubt, then the change was
	not made.

	The patch compiles cleanly, and appears to have had no ill effects.

>How-To-Repeat:

	N/A

>Fix:
	
Patch follows.

-----


Index: linux/linux_mib.c
===================================================================
RCS file: /usr/home/ncvs/src/sys/compat/linux/linux_mib.c,v
retrieving revision 1.7
diff -u -r1.7 linux_mib.c
--- linux/linux_mib.c	2000/08/25 07:31:13	1.7
+++ linux/linux_mib.c	2000/10/21 14:27:45
@@ -123,8 +123,7 @@
 
 	if (pr->pr_linux == NULL) {
 		MALLOC(lpr, struct linux_prison *, sizeof *lpr,
-		       M_PRISON, M_WAITOK);
-		bzero((caddr_t)lpr, sizeof *lpr);
+		       M_PRISON, M_WAITOK | M_ZERO);
 		pr->pr_linux = lpr;
 	}
 


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001021143151.D09C23D1D>