Skip to content

Commit

Permalink
[SCSI] dpt_i2o: driver is only 32 bit so don't set 64 bit DMA mask
Browse files Browse the repository at this point in the history
This fixes a potential corruption bug where the truncation would cause
reading or writing to the wrong memory area on machines with >4GB of
main memory.

Cc: Stable Kernel Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
James Bottomley authored and James Bottomley committed Dec 18, 2007
1 parent 7ee2413 commit c80ddf0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/dpt_i2o.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
}

pci_set_master(pDev);
if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) &&
pci_set_dma_mask(pDev, DMA_32BIT_MASK))
if (pci_set_dma_mask(pDev, DMA_32BIT_MASK))
return -EINVAL;

base_addr0_phys = pci_resource_start(pDev,0);
Expand Down

0 comments on commit c80ddf0

Please sign in to comment.