scsi_scan.c

From: Andre Straker-Payne
Date: Thu Sep 22 2005 - 10:15:34 EST


With regards to Linux 2.6, file "drivers/scsi/scsi_scan.c", lines 691 and 928.

691 result = kmalloc(256, GFP_ATOMIC |
692 (host->unchecked_isa_dma) ? __GFP_DMA : 0);

928 lun_data = kmalloc(length, GFP_ATOMIC |
929 (sdev->host->unchecked_isa_dma ? __GFP_DMA :
0));

In line 691, the evaluation done to fill the priority field for the kmalloc is
ambiguous. If your system does not support the GFP_DMA type, this call will
fail, since it always evaluates true. I imagine that 928 is shows what this 691
should look like.

Andre Straker-Payne

"There are known knowns. These are things we know that we know. There are known unknowns. That is to say, there are things that we know we don't know. But there are also unknown unknowns. There are things we don't know we don't know. "
-
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/