RDMA/umem: Fix ib_umem_find_best_pgsz()
authorArtemy Kovalyov <artemyko@mellanox.com>
Tue, 28 Jan 2020 13:56:12 +0000 (15:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:34:08 +0000 (16:34 -0500)
commit21702236f3520d28981267bd4bf5ca68fd9231db
tree09cee73611a9e47a6d6656a49c1fce24f668a923
parent56b22525ab803752197a64baddf1cb927a424937
RDMA/umem: Fix ib_umem_find_best_pgsz()

commit 36798d5ae1af62e830c5e045b2e41ce038690c61 upstream.

Except for the last entry, the ending iova alignment sets the maximum
possible page size as the low bits of the iova must be zero when starting
the next chunk.

Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR")
Link: https://lore.kernel.org/r/20200128135612.174820-1-leon@kernel.org
Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Tested-by: Gal Pressman <galpress@amazon.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/umem.c