Re: [PATCH bpf-next v1 5/6] bpf: selftests: Fix fd cleanup in sk_lookup test
From: Song Liu <song@kernel.org>
Date: 2021-10-07 21:48:15
Also in:
bpf
From: Song Liu <song@kernel.org>
Date: 2021-10-07 21:48:15
Also in:
bpf
On Tue, Oct 5, 2021 at 11:50 PM Jakub Sitnicki [off-list ref] wrote:
On Wed, Oct 06, 2021 at 02:28 AM CEST, Kumar Kartikeya Dwivedi wrote:quoted
Similar to the fix in commit: e31eec77e4ab (bpf: selftests: Fix fd cleanup in get_branch_snapshot) We use memset to set fds to -1 without breaking on future changes to the array size (when MAX_SERVER constant is bumped). The particular close(0) occurs on non-reuseport tests, so it can be seen with -n 115/{2,3} but not 115/4. This can cause problems with future tests if they depend on BTF fd never being acquired as fd 0, breaking internal libbpf assumptions. Cc: Jakub Sitnicki <jakub@cloudflare.com> Fixes: 0ab5539f8584 (selftests/bpf: Tests for BPF_SK_LOOKUP attach point)
Similar to Andrii's comment in 6/6, we need add " to the Fixes tag.
quoted
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: Song Liu <redacted>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>