OpenCloudOS-Kernel/drivers/infiniband/hw
Bart Van Assche 99975cd4fd mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array
ib_map_mr_sg() can pass an SG-list to .map_mr_sg() that is larger
than what fits into a single MR. .map_mr_sg() must not attempt to
map more SG-list elements than what fits into a single MR.
Hence make sure that mlx5_ib_sg_to_klms() does not write outside
the MR klms[] array.

Fixes: b005d31647 ("mlx5: Add arbitrary sg list support")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Leon Romanovsky <leonro@mellanox.com>
Cc: Israel Rukshin <israelr@mellanox.com>
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-07-17 11:45:07 -04:00
..
bnxt_re RDMA/bnxt_re: Remove FMR support 2017-06-14 13:02:00 -04:00
cxgb3 networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
cxgb4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-21 17:35:22 -04:00
hfi1 IB/hfi1: Ensure dd->gi_mask can not be overflowed 2017-07-17 11:39:45 -04:00
hns scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
i40iw sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
mlx4 IB/mlx4: Bump driver version 2017-06-07 15:33:01 -04:00
mlx5 mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array 2017-07-17 11:45:07 -04:00
mthca IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
nes Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
ocrdma IB/ocrdma: fix out of bounds access to local buffer 2017-05-01 15:04:23 -04:00
qedr Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-21 17:35:22 -04:00
qib RDMA/qib,hfi1: Fix MR reference count leak on write with immediate 2017-06-01 17:04:33 -04:00
usnic IB/core: Rename struct ib_ah_attr to rdma_ah_attr 2017-05-01 14:32:43 -04:00
vmw_pvrdma IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
Makefile RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00