]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix integer overflow when page_shift == 31
authorIlya Lesokhin <ilyal@mellanox.com>
Thu, 17 Aug 2017 12:52:32 +0000 (15:52 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 24 Aug 2017 21:47:34 +0000 (17:47 -0400)
commitc8f1f701ea14ec06739b02d7e31a0b65703825d6
treea5b8fb1a7012e3b79d4bce69d543d381b228dc74
parent9b17672bcf6d09e261065d6a76302e6c0aa17d09
IB/mlx5: Fix integer overflow when page_shift == 31

Fix a bug where MR registration fails when mlx5_ib_cont_pages
indicates that the MR can be mapped using 2GB pages (page_shift == 31).

Fixes: 7c120481afcc ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/mr.c