linux-stable/drivers/infiniband
Jason Gunthorpe c1e670b0db RDMA/mlx5: Ensure created mkeys always have a populated rb_key
commit 2e4c02fdec upstream.

cachable and mmkey.rb_key together are used by mlx5_revoke_mr() to put the
MR/mkey back into the cache. In all cases they should be set correctly.

alloc_cacheable_mr() was setting cachable but not filling rb_key,
resulting in cache_ent_find_and_store() bucketing them all into a 0 length
entry.

implicit_get_child_mr()/mlx5_ib_alloc_implicit_mr() failed to set cachable
or rb_key at all, so the cache was not working at all for implicit ODP.

Cc: stable@vger.kernel.org
Fixes: 8c1185fef6 ("RDMA/mlx5: Change check for cacheable mkeys")
Fixes: dd1b913fb0 ("RDMA/mlx5: Cache all user cacheable mkeys on dereg MR flow")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/7778c02dfa0999a30d6746c79a23dd7140a9c729.1716900410.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-27 13:52:28 +02:00
..
core inet: introduce dst_rtable() helper 2024-06-12 11:39:55 +02:00
hw RDMA/mlx5: Ensure created mkeys always have a populated rb_key 2024-06-27 13:52:28 +02:00
sw RDMA/rxe: Fix data copy for IB_SEND_INLINE 2024-06-27 13:52:27 +02:00
ulp RDMA/IPoIB: Fix format truncation compilation errors 2024-05-30 09:45:01 +02:00
Kconfig RDMA: Disable IB HW for UML 2022-12-04 15:22:03 +02:00
Makefile