Skip to content

Commit

Permalink
[PATCH] SCSI GFP fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Apr 24, 2005
1 parent df6c680 commit bc86120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit bc86120

Please sign in to comment.