From owner-p4-projects@FreeBSD.ORG Wed Mar 28 19:22:18 2007 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 85ADE16A413; Wed, 28 Mar 2007 19:22:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 291EA16A40B; Wed, 28 Mar 2007 19:22:18 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 51B8C13C4EE; Wed, 28 Mar 2007 19:22:16 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [193.217.102.48] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe02.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 452927742; Wed, 28 Mar 2007 20:22:14 +0200 From: Hans Petter Selasky To: Scott Long Date: Wed, 28 Mar 2007 20:21:54 +0200 User-Agent: KMail/1.9.5 References: <200703281803.l2SI3u28016029@repoman.freebsd.org> In-Reply-To: <200703281803.l2SI3u28016029@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703282021.54511.hselasky@c2i.net> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 116755 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: Wed, 28 Mar 2007 19:22:18 -0000 On Wednesday 28 March 2007 20:03, Scott Long wrote: > http://perforce.freebsd.org/chv.cgi?CH=116755 > > Change 116755 by scottl@scottl-x64 on 2007/03/28 18:03:15 > > Work around malloc locking constraints. > > Affected files ... > > .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_cd.c#15 edit > > Differences ... > Isn't it possible to pre-allocate this memory somewhere? > > + /* XXX Should be M_WAITOK */ > rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), > - M_TEMP, M_WAITOK); > + M_TEMP, M_NOWAIT); > + if (rcap_buf == NULL) > + return (ENOMEM); > > scsi_read_capacity(&ccb->csio, > /*retries*/ 1, --HPS