[ofa-general] mlx4: device driver tries to sync DMA memory it has not allocated

Eli Cohen eli at dev.mellanox.co.il
Wed Aug 12 00:05:58 PDT 2009


On Tue, Aug 11, 2009 at 11:23:48PM -0700, Roland Dreier wrote:
> 
> Maybe I'm missing your point, but mlx4_table_find() does go to some
> trouble to find the right DMA address for the object being looked up.
> Of course it could be buggy but I still don't see why we would need a
> list of DMA addresses when we know we are only going to sync part of one
> page?

Is this is always true? What if you allocated an ICM buffer that uses
none adjacent pages? In this case you would need more than one call to
dma_sync_single_for_*(), isn't it?

> 
> I think the right thing to do to fix this is to switch to using
> map_single instead of map_sg, and then use dma_sync_single_range_for_xxx
> to sync the subset we care about.
> 
>  - R.



More information about the general mailing list