OpenCloudOS-Kernel/drivers/infiniband/hw/mlx5
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
..
Kconfig net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality 2015-05-30 18:24:51 -07:00
Makefile IB/mlx5: Add null_mkey access 2017-02-14 11:41:18 -05:00
ah.c IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
cmd.c IB/mlx5: Support congestion related counters 2017-04-21 12:29:31 -04:00
cmd.h IB/mlx5: Support congestion related counters 2017-04-21 12:29:31 -04:00
cq.c {net, IB}/mlx5: Replace mlx5_vzalloc with kvzalloc 2017-05-14 13:53:18 +03:00
doorbell.c IB/mlx5: Fix Mellanox copyright note 2015-04-02 16:33:42 -04:00
gsi.c IB/mlx5: Fix iteration overrun in GSI qps 2016-08-02 14:32:51 -04:00
ib_virt.c IB/mlx5: Implement callbacks for manipulating VFs 2016-03-21 17:13:14 -04:00
mad.c {net, IB}/mlx5: Replace mlx5_vzalloc with kvzalloc 2017-05-14 13:53:18 +03:00
main.c Fixes #3 for 4.12-rc 2017-07-06 11:45:08 -07:00
mem.c IB/mlx5: Add contiguous ODP support 2017-04-25 15:40:28 -04:00
mlx5_ib.h RDMA/mlx5: set UMR wqe fence according to HCA cap 2017-06-01 17:19:57 -04:00
mr.c mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array 2017-07-17 11:45:07 -04:00
odp.c IB/mlx5: Add ODP support to MW 2017-04-25 15:40:28 -04:00
qp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-06 22:20:08 -04:00
srq.c {net, IB}/mlx5: Replace mlx5_vzalloc with kvzalloc 2017-05-14 13:53:18 +03:00