Loading
RDMA/hns: Fix NULL pointer derefernce in hns_roce_map_mr_sg()
mainline inclusion from mainline-v6.13-rc1 commit 6b526d17eed850352d880b93b9bf20b93006bd92 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB4ZYK Reference: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=6b526d17eed850352d880b93b9bf20b93006bd92 ---------------------------------------------------------------------- ib_map_mr_sg() allows ULPs to specify NULL as the sg_offset argument. The driver needs to check whether it is a NULL pointer before dereferencing it. Fixes: d387d4b54eb8 ("RDMA/hns: Fix missing pagesize and alignment check in FRMR") Signed-off-by:Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patch.msgid.link/20241108075743.2652258-3-huangjunxian6@hisilicon.com Signed-off-by:
Leon Romanovsky <leon@kernel.org> Signed-off-by:
huwentao <huwentao19@h-partners.com>