PERFORCE change 116755 for review

Hans Petter Selasky hselasky at c2i.net
Wed Mar 28 19:22:18 UTC 2007


On Wednesday 28 March 2007 20:03, Scott Long wrote:
> http://perforce.freebsd.org/chv.cgi?CH=116755
>
> Change 116755 by scottl at 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


More information about the p4-projects mailing list