Commit fd784d12 authored by Magnus Karlsson's avatar Magnus Karlsson Committed by Yang Yingliang
Browse files

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: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/1576759171-28550-13-git-send-email-magnus.karlsson@intel.com


Signed-off-by: default avatarHuang Guobin <huangguobin4@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 3c002599
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment