]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] SCSI GFP fixes
authorAl Viro <viro@www.linux.org.uk>
Sun, 24 Apr 2005 19:28:34 +0000 (12:28 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 24 Apr 2005 19:28:34 +0000 (12:28 -0700)
Somebody forgot that | has higher priority than ?:.  As the result,
allocation is done with bogus flags - instead of GFP_ATOMIC + possibly
GFP_DMA we always get GFP_DMA and no GFP_ATOMIC.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/scsi/scsi_error.c
drivers/scsi/scsi_scan.c

index 1a135f38e78d8965d9a9fab95ca58614e7db61a3..2bf1ee2b47b645b8bcaf74640e139ee5c018e076 100644 (file)
@@ -584,7 +584,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd)
 
        memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense));
 
-       scsi_result = kmalloc(252, GFP_ATOMIC | (scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0);
+       scsi_result = kmalloc(252, GFP_ATOMIC | ((scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0));
 
 
        if (unlikely(!scsi_result)) {
index 287d197a7c17f8527668ee162361b9552f04d948..cca772624ae701ea8278ce770c10c8617e710c5e 100644 (file)
@@ -801,7 +801,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
        if (!sreq)
                goto out_free_sdev;
        result = kmalloc(256, GFP_ATOMIC |
-                       (shost->unchecked_isa_dma) ? __GFP_DMA : 0);
+                       ((shost->unchecked_isa_dma) ? __GFP_DMA : 0));
        if (!result)
                goto out_free_sreq;