]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDMA/rxe: Prevent faulty rkey generation
authorDaisuke Matsuda <matsuda-daisuke@fujitsu.com>
Tue, 20 Dec 2022 08:08:48 +0000 (17:08 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:06 +0000 (08:34 +0100)
commitd7c71f93cfac8553efc6eea2d97012616aa7ec4c
tree0b6aef6f838d74f885f5e167123532411eca32e3
parent7ca8aa835464efacf5a90babf341823514495998
RDMA/rxe: Prevent faulty rkey generation

[ Upstream commit 1aefe5c177c1922119afb4ee443ddd6ac3140b37 ]

If you create MRs more than 0x10000 times after loading the module,
responder starts to reply NAKs for RDMA/Atomic operations because of rkey
violation detected in check_rkey(). The root cause is that rkeys are
incremented each time a new MR is created and the value overflows into the
range reserved for MWs.

This commit also increases the value of RXE_MAX_MW that has been limited
unlike other parameters.

Fixes: 0994a1bcd5f7 ("RDMA/rxe: Bump up default maximum values used via uverbs")
Link: https://lore.kernel.org/r/20221220080848.253785-2-matsuda-daisuke@fujitsu.com
Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Tested-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_param.h