Re: cciss update [1/2] updates our SCSI support to not use deprecated headers

From: Jeff Garzik
Date: Wed Oct 13 2004 - 16:33:54 EST


On Wed, Oct 13, 2004 at 04:13:02PM -0500, mike.miller@xxxxxxx wrote:
> @@ -552,11 +547,12 @@ cciss_scsi_setup(int cntl_num)
> static void
> complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
> {
> - Scsi_Cmnd *cmd;
> + struct scsi_cmnd *cmd;
> ctlr_info_t *ctlr;
> u64bit addr64;
> ErrorInfo_struct *ei;
>
> + cmd = kmalloc(sizeof(struct scsi_cmnd), GFP_KERNEL);
> ei = cp->err_info;
>

This can get called from the interrupt handler, so GFP_KERNEL won't
work. GFP_ATOMIC works, but you need to check kmalloc() return for
NULL.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/