From owner-freebsd-current Sun Feb 22 01:49:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA09784 for freebsd-current-outgoing; Sun, 22 Feb 1998 01:49:22 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from friley585.res.iastate.edu (friley585.res.iastate.edu [129.186.167.85]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA09779 for ; Sun, 22 Feb 1998 01:49:21 -0800 (PST) (envelope-from ccsanady@friley585.res.iastate.edu) Received: from friley585.res.iastate.edu (loopback [127.0.0.1]) by friley585.res.iastate.edu (8.8.8/8.8.8) with ESMTP id DAA00394; Sun, 22 Feb 1998 03:49:15 -0600 (CST) (envelope-from ccsanady@friley585.res.iastate.edu) Message-Id: <199802220949.DAA00394@friley585.res.iastate.edu> To: Julian Elischer cc: "Matthew N. Dodd" , current@FreeBSD.ORG Subject: CCD Fix (Was: Re: New SoftUpdates test kit) In-reply-to: Your message of "Sat, 21 Feb 1998 22:33:56 PST." Date: Sun, 22 Feb 1998 03:49:15 -0600 From: Chris Csanady Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >I don;t know yet however kirk says that the symptom is exactly matching >that he saw with bufs not being bzero'd when malloc'd. >I'm going to look at that next week. Well, this seems to be it. :) I remember seeing something like this while browsing through the OpenBSD cvs tree, but the log message did not mention that the change had such serious implications. Anyways, with the following diff, soft updates should work with CCD's. Or rather the other way around.. ;) Chris *** ccd.c Sun Feb 15 05:13:27 1998 --- /sys/dev/ccd/ccd.c Sun Feb 22 01:43:26 1998 *************** *** 885,890 **** --- 885,891 ---- * Fill in the component buf structure. */ cbp = getccdbuf(); + bzero(cbp, sizeof (struct ccdbuf)); cbp->cb_buf.b_flags = bp->b_flags | B_CALL; cbp->cb_buf.b_iodone = (void (*)(struct buf *))ccdiodone; cbp->cb_buf.b_proc = bp->b_proc; *************** *** 919,924 **** --- 920,926 ---- (cbp->cb_buf.b_flags & B_READ) == 0) { /* mirror, start one more write */ cbp = getccdbuf(); + bzero(cbp, sizeof (struct ccdbuf)); *cbp = *cb[0]; cbp->cb_buf.b_dev = ci2->ci_dev; cbp->cb_buf.b_vp = ci2->ci_vp; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message