From: James Bottomley Date: Wed, 12 Dec 2007 20:06:21 +0000 (-0500) Subject: [SCSI] dpt_i2o: driver is only 32 bit so don't set 64 bit DMA mask X-Git-Tag: v2.6.24-rc6~15^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c80ddf00cde4c21018dbd0ea2872736c90c7dda2;p=linux-2.6-omap-h63xx.git [SCSI] dpt_i2o: driver is only 32 bit so don't set 64 bit DMA mask 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 70f48a1a6d5..b31d1c95c9f 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -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);