android_kernel_xiaomi_sm7250/drivers/infiniband
Michael S. Tsirkin 46707e96b7 IB/mthca: Fix off-by-one in FMR handling on memfree
mthca_table_find() will return the wrong address when the table entry
being searched for is exactly at the beginning of a sglist entry
(other than the first), because it uses >= when it should use >.

Example: assume we have 2 entries in scatterlist, 4K each, offset is
4K.  The current code will return first entry + 4K when we really want
the second entry.

In particular this means mapping an FMR on a memfree HCA may end up
writing the page table into the wrong place, leading to memory
corruption and also causing the HCA to use an incorrect address
translation table.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-01-04 19:46:32 -08:00
..
core IB/core: Use the new verbs DMA mapping functions 2006-12-12 14:28:30 -08:00
hw IB/mthca: Fix off-by-one in FMR handling on memfree 2007-01-04 19:46:32 -08:00
ulp IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G 2006-12-15 14:01:49 -08:00
Kconfig RDMA/amso1100: Add driver for Ammasso 1100 RNIC 2006-09-22 15:22:48 -07:00
Makefile RDMA/amso1100: Add driver for Ammasso 1100 RNIC 2006-09-22 15:22:48 -07:00