RDMA/hns: Add a max length of gid table
mainline inclusion from mainline-v6.8-rc1 commit 7243396aaf12385ba514764b6401bcd15e1a52c7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8W3IU CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7243396aaf12385ba514764b6401bcd15e1a52c7 ---------------------------------------------------------------------- IB-core and rdma-core restrict the sgid_index specified by users, which is uint8_t/u8 data type, to only be within the range of 0-255, so it's meaningless to support excessively large gid_table_len. On the other hand, ib-core creates as many sysfs gid files as gid_table_len, most of which are not only useless because of the reason above, but also greatly increase the traversal time of the sysfs gid files for applications. This patch limits the maximum length of gid table to 256. Signed-off-by:Junxian Huang <huangjunxian6@hisilicon.com> Link: https://lore.kernel.org/r/20231207114231.2872104-4-huangjunxian6@hisilicon.com Signed-off-by:
Leon Romanovsky <leon@kernel.org> Signed-off-by:
Juan Zhou <zhoujuan51@h-partners.com>
Loading
Please sign in to comment