Commit ecc69334 authored by Chengchang Tang's avatar Chengchang Tang Committed by Greg Kroah-Hartman
Browse files

RDMA/hns: Fix undifined behavior caused by invalid max_sge



[ Upstream commit 36397b90 ]

If max_sge has been set to 0, roundup_pow_of_two() in
set_srq_basic_param() may have undefined behavior.

Fixes: 9dd05247 ("RDMA/hns: Allocate one more recv SGE for HIP08")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20240710133705.896445-7-huangjunxian6@hisilicon.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3c301b8a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment