IB/mlx5: Fix out-of-bound access
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 18 Jan 2017 12:10:30 +0000 (14:10 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 14 Feb 2017 15:14:25 +0000 (10:14 -0500)
commit0fd27a88c2e4f548937fd7d93fc6e65c4ad7c278
tree030acb22c1621e984a081b4014a1c60e83fc0d34
parentbda65b4255ac983ce36a6c0ea6a7794f8e8fcc86
IB/mlx5: Fix out-of-bound access

When we initialize buffer to create SRQ in kernel,
the number of pages was less than actually used in
following mlx5_fill_page_array().

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/srq.c