linux-stable/drivers/infiniband
Sergey Gorenko f1833eb130 IB/mlx5: Fix incorrect size of klms in the memory region
commit da343b6d90 upstream.

The value of mr->ndescs greater than mr->max_descs is set in the
function mlx5_ib_sg_to_klms() if sg_nents is greater than
mr->max_descs. This is an invalid value and it causes the
following error when registering mr:

mlx5_0:dump_cqe:276:(pid 193): dump error cqe
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000030: 00 00 00 00 0f 00 78 06 25 00 00 8b 08 1e 8f d3

Cc: <stable@vger.kernel.org> # 4.5
Fixes: b005d31647 ("mlx5: Add arbitrary sg list support")
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-15 10:54:33 +01:00
..
core IB/core: Fix missing RDMA cgroups release in case of failure to register device 2018-03-15 10:54:33 +01:00
hw IB/mlx5: Fix incorrect size of klms in the memory region 2018-03-15 10:54:33 +01:00
sw RDMA/rxe: Fix rxe_qp_cleanup() 2018-02-22 15:42:15 +01:00
ulp IB/ipoib: Fix race condition in neigh creation 2018-03-03 10:24:33 +01:00
Kconfig IB/core: Expose ioctl interface through experimental Kconfig 2017-08-31 08:35:14 -04:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00