Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2007 20:21:54 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Scott Long <scottl@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 116755 for review
Message-ID:  <200703282021.54511.hselasky@c2i.net>
In-Reply-To: <200703281803.l2SI3u28016029@repoman.freebsd.org>
References:  <200703281803.l2SI3u28016029@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703282021.54511.hselasky>