IB/mlx5: Fix out-of-bound access
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 18 Jan 2017 12:10:30 +0000 (14:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Mar 2017 02:02:43 +0000 (10:02 +0800)
commit04f16db056d035785f217f1b958fe49ca3cd9be5
tree6ab60b03f1ab07141d3e3e765960b01f79667984
parent2e539fa49efda450229e3a13db5202b4d9ae2997
IB/mlx5: Fix out-of-bound access

commit 0fd27a88c2e4f548937fd7d93fc6e65c4ad7c278 upstream.

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")
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/srq.c