xsk: Use struct_size() helper
mainline inclusion from mainline-v5.6-rc1 commit 1d9cb1f3 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4SGA9?from=project-issue CVE: NA -------------------------------- Improve readability and maintainability by using the struct_size() helper when allocating the AF_XDP rings. Signed-off-by: NMagnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/1576759171-28550-13-git-send-email-magnus.karlsson@intel.comSigned-off-by: NHuang Guobin <huangguobin4@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录