]> www.infradead.org Git - users/dwmw2/linux.git/commit
IB/core: Fix ODP with IB_ACCESS_HUGETLB handling
authorYishai Hadas <yishaih@mellanox.com>
Sun, 22 Dec 2019 12:46:49 +0000 (14:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:37:19 +0000 (04:37 -0800)
commit394b51c7355b0d5d599dc803db121f0f637e2f68
tree52fe45dd130037e5347c0dcf0f2bafb5952d19e7
parent96491fb390e02004a8b26cca62fb760243440d9b
IB/core: Fix ODP with IB_ACCESS_HUGETLB handling

commit 9ff1b6466a291a33389c4a9c7f3f9b64d62df40a upstream.

As VMAs for a given range might not be available as part of the
registration phase in ODP.

ib_init_umem_odp() considered the expected page shift value that was
previously set and initializes its internals accordingly.

If memory isn't backed by physical contiguous pages aligned to a hugepage
boundary an error will be set as part of the page fault flow and come back
to the user as some failed RDMA operation.

Fixes: 0008b84ea9af ("IB/umem: Add support to huge ODP")
Link: https://lore.kernel.org/r/20191222124649.52300-4-leon@kernel.org
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.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_odp.c