Re: [PATCH] Mark i2o config broken on 64-bit platforms.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(apologies for the bouncing mail earlier today, somebody [who _will_ buy
us all sushi tomorrow] broke our mail setup ...)

On Wed, 2008-07-09 at 15:15 +0100, David Howells wrote:
> Miquel van Smoorenburg <miquels@xxxxxxxxxx> wrote:
>
> > second, compiling it gives warnings, but it works, and I bet people are
> > using it.
> 
> Maybe, but have you looked at i2o_cfg_passthru()?  Take this, for example:
> 
> 			/* Allocate memory for the transfer */
> 			p = kmalloc(sg_size, GFP_KERNEL);
> 			...
> 			//TODO 64bit fix
> 			sg[i].addr_bus = virt_to_bus(p);
> 
> That looks distinctly dodgy.  virt_to_bus() returns a 64-bit address, and as
> far as I know you may not assume that it will return a 32-bit address.  You're
> taking the bus-address of a piece of RAM, but there may be more than 4GB of
> RAM in the system.

Oh dear, that's indeed bad. Looks like that should use i2o_dma_alloc()
instead. (drivers/scsi/dpt_i2o.c gets this right).

(and what's with the (unlocked!) pci_set_dma_mask() flipping in
i2o_dma_alloc() ? )

Mike.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux