From owner-p4-projects@FreeBSD.ORG Fri Jul 14 07:50:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C796B16A4E6; Fri, 14 Jul 2006 07:50:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C30716A4DE; Fri, 14 Jul 2006 07:50:07 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id B449543D49; Fri, 14 Jul 2006 07:50:06 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from [193.217.134.164] (HELO [10.0.0.249]) by mailfe01.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 214322305; Fri, 14 Jul 2006 09:50:04 +0200 From: Hans Petter Selasky To: Scott Long Date: Fri, 14 Jul 2006 09:50:11 +0200 User-Agent: KMail/1.7 References: <200607140311.k6E3BGUv013408@repoman.freebsd.org> In-Reply-To: <200607140311.k6E3BGUv013408@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607140950.12582.hselasky@c2i.net> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 101501 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2006 07:50:08 -0000 On Friday 14 July 2006 05:11, Scott Long wrote: > http://perforce.freebsd.org/chv.cgi?CH=101501 > > Change 101501 by scottl@scottl-x64 on 2006/07/14 03:10:59 > > Re-allow anonymous CCB's. > > Affected files ... > > .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#41 edit > .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_low.c#9 edit > > Differences ... > > ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#41 (text+ko) > ==== > > @@ -4981,9 +4981,11 @@ > union ccb *new_ccb; > > new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_WAITOK); > - callout_handle_init(&new_ccb->ccb_h.timeout_ch); > - callout_init(&new_ccb->ccb_h.callout, > - (sim->flags & CAM_SIM_MPSAFE) ? 1 : 0); > + if (sim != NULL) { > + callout_handle_init(&new_ccb->ccb_h.timeout_ch); > + callout_init(&new_ccb->ccb_h.callout, > + (sim->flags & CAM_SIM_MPSAFE) ? 1 : 0); > + } > return (new_ccb); > } > Shouldn't you use "callout_init_mtx()", when dropping Giant, to avoid timout after timeout stop situations ? --HPS