Re: [PATCH v3 bpf-next 4/5] selftests/bpf: Use calloc to allocate subtest_states

From: bot+bpf-ci

Date: Thu Jul 23 2026 - 05:55:37 EST


> selftests/bpf: Use calloc to allocate subtest_states
>
> An early return triggered by read_prog_test_msg leaves uninitialized elements,
> which leads to memory corruption during free_test_states cleanup.
>
> Signed-off-by: Feng Yang <yangfeng@xxxxxxxxxx>

This looks like a fix for a memory corruption bug in
dispatch_thread_send_subtests(). The uninitialized elements that
free_test_states() later frees were introduced when the malloc() plus
per-element memset() allocation was added. Should this include:

Fixes: 0925225956bb ("bpf/selftests: Add granular subtest output for prog_test")


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/29993688332