This is a note to let you know that I've just added the patch titled selftests/bpf: Fix bpf_object leak in skb_ctx selftest to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-bpf-fix-bpf_object-leak-in-skb_ctx-selftes.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit d013369a55bd5f479ed6bac947ca9eab1de94279 Author: Andrii Nakryiko <andrii@xxxxxxxxxx> Date: Sun Nov 7 08:55:21 2021 -0800 selftests/bpf: Fix bpf_object leak in skb_ctx selftest [ Upstream commit 8c7a95520184b6677ca6075e12df9c208d57d088 ] skb_ctx selftest didn't close bpf_object implicitly allocated by bpf_prog_test_load() helper. Fix the problem by explicitly calling bpf_object__close() at the end of the test. Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> Reviewed-by: Hengqi Chen <hengqi.chen@xxxxxxxxx> Link: https://lore.kernel.org/bpf/20211107165521.9240-10-andrii@xxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/testing/selftests/bpf/prog_tests/skb_ctx.c b/tools/testing/selftests/bpf/prog_tests/skb_ctx.c index fafeddaad6a99..23915be6172d6 100644 --- a/tools/testing/selftests/bpf/prog_tests/skb_ctx.c +++ b/tools/testing/selftests/bpf/prog_tests/skb_ctx.c @@ -105,4 +105,6 @@ void test_skb_ctx(void) "ctx_out_mark", "skb->mark == %u, expected %d\n", skb.mark, 10); + + bpf_object__close(obj); }