Loading
RDMA/hns: Fix missing validation check of DCA mem size
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9SI44 ---------------------------------------------------------------------- DCA mem size from userspace should be aligned to HNS_HW_PAGE_SIZE as the DCA buffer is managed in the form of pages. Otherwise it may lead to a mis-calculation of pages, which is basically dividing the size by HNS_HW_PAGE_SIZE. Besides, zero size is invalid since it will lead to the failure of page allocation in ib_umem_get(). Fixes: f44a2f97 ("RDMA/hns: Introduce DCA for RC QP") Signed-off-by:Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by:
Guofeng Yue <yueguofeng@h-partners.com>