aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/aggregator/controller.c
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2023-06-06 17:22:02 +0000
committerAndrii Nakryiko <[email protected]>2023-06-06 18:07:26 +0000
commit69844e335d8c22454746c7903776533d8b4ab8fa (patch)
treecd10ec787c7f55b6f00c8381e43af5f2020f4530 /drivers/platform/surface/aggregator/controller.c
parentbpf: netfilter: Add BPF_NETFILTER bpf_attach_type (diff)
downloadkernel-69844e335d8c22454746c7903776533d8b4ab8fa.tar.gz
kernel-69844e335d8c22454746c7903776533d8b4ab8fa.zip
selftests/bpf: Fix sockopt_sk selftest
Commit f4e4534850a9 ("net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report") fixed NETLINK_LIST_MEMBERSHIPS length report which caused selftest sockopt_sk failure. The failure log looks like test_sockopt_sk:PASS:join_cgroup /sockopt_sk 0 nsec run_test:PASS:skel_load 0 nsec run_test:PASS:setsockopt_link 0 nsec run_test:PASS:getsockopt_link 0 nsec getsetsockopt:FAIL:Unexpected NETLINK_LIST_MEMBERSHIPS value unexpected Unexpected NETLINK_LIST_MEMBERSHIPS value: actual 8 != expected 4 run_test:PASS:getsetsockopt 0 nsec #201 sockopt_sk:FAIL In net/netlink/af_netlink.c, function netlink_getsockopt(), for NETLINK_LIST_MEMBERSHIPS, nlk->ngroups equals to 36. Before Commit f4e4534850a9, the optlen is calculated as ALIGN(nlk->ngroups / 8, sizeof(u32)) = 4 After that commit, the optlen is ALIGN(BITS_TO_BYTES(nlk->ngroups), sizeof(u32)) = 8 Fix the test by setting the expected optlen to be 8. Fixes: f4e4534850a9 ("net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report") Signed-off-by: Yonghong Song <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/platform/surface/aggregator/controller.c')
0 files changed, 0 insertions, 0 deletions