Loading
RDMA/hns: Fix undifined behavior caused by invalid max_sge
mainline inclusion from mainline-v6.10-rc7 commit 36397b907355e2fdb5a25a02a7921a937fd8ef4c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IADZY7 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=36397b907355e2fdb5a25a02a7921a937fd8ef4c --------------------------------------------------------------------- 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:Chengchang Tang <tangchengchang@huawei.com> Signed-off-by:
Junxian Huang <huangjunxian6@hisilicon.com> Link: https://lore.kernel.org/r/20240710133705.896445-7-huangjunxian6@hisilicon.com Signed-off-by:
Leon Romanovsky <leon@kernel.org> Signed-off-by:
Xinghai Cen <cenxinghai@h-partners.com>