]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: Don't close(-1) in serial_test_fexit_stress()
authorMa Ke <make24@iscas.ac.cn>
Sun, 23 Jun 2024 13:17:53 +0000 (21:17 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 26 Jun 2024 23:36:59 +0000 (16:36 -0700)
commitd07980f7373b4c57c85478f8e815cc7b9b394c05
treeff6d8308e02da9c27c0e04ec2e8d4b2934ee74e0
parentaa293983d2020390e286544b120f3cd0a3d40749
selftests/bpf: Don't close(-1) in serial_test_fexit_stress()

Guard close() with extra link_fd[i] > 0 and fexit_fd[i] > 0
check to prevent close(-1).

Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240623131753.2133829-1-make24@iscas.ac.cn
tools/testing/selftests/bpf/prog_tests/fexit_stress.c