From josh@zipperup.org  Sat Oct 21 07:31:53 2000
Return-Path: <josh@zipperup.org>
Received: from mail.snickers.org (snickers.org [216.126.90.2])
	by hub.freebsd.org (Postfix) with ESMTP
	id 92C1037B4CF; Sat, 21 Oct 2000 07:31:52 -0700 (PDT)
Received: by mail.snickers.org (Postfix, from userid 1037)
	id D09C23D1D; Sat, 21 Oct 2000 10:31:51 -0400 (EDT)
Message-Id: <20001021143151.D09C23D1D@mail.snickers.org>
Date: Sat, 21 Oct 2000 10:31:51 -0400 (EDT)
From: josh@zipperup.org
Reply-To: josh@zipperup.org
To: FreeBSD-gnats-submit@freebsd.org
Cc: dwmalone@freebsd.org, marcel@freebsd.org
Subject: Patch to sys/compat/linux to add M_ZERO to appropriate malloc calls
X-Send-Pr-Version: 3.2

>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:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 21 07:40:01 PDT 2000
>Closed-Date:    Sun Dec 24 08:28:23 PST 2000
>Last-Modified:  Sun Dec 24 08:29:39 PST 2000
>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:
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Sat Oct 21 12:08:31 PDT 2000 
Responsible-Changed-Why:  
I'm looking at these - patches to date at: 

http://www.maths.tcd.ie/~dwmalone/thirdtry 


http://www.freebsd.org/cgi/query-pr.cgi?pr=22189 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Sun Dec 24 08:28:23 PST 2000 
State-Changed-Why:  
Patches committed - thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22168 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Sun Dec 24 08:28:23 PST 2000 
State-Changed-Why:  
Patches committed - thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22186 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Sun Dec 24 08:28:23 PST 2000 
State-Changed-Why:  
Patches committed - thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22188 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Sun Dec 24 08:28:23 PST 2000 
State-Changed-Why:  
Patches committed - thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22189 
>Unformatted:
