From owner-freebsd-bugs Sat Oct 21 7:40: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EFC1637B4CF for ; Sat, 21 Oct 2000 07:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA52613; Sat, 21 Oct 2000 07:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.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 X-Send-Pr-Version: 3.2 Subject: kern/22189: Patch to sys/compat/linux to add M_ZERO to appropriate malloc calls Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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