提交 bc86120a 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] SCSI GFP fixes

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: NAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 df6c6804
......@@ -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)) {
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册