summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_re.py
diff options
context:
space:
mode:
authorJiayuan Chen <jiayuan.chen@linux.dev>2025-09-09 20:47:04 +0800
committerAndrii Nakryiko <andrii@kernel.org>2025-09-09 09:23:47 -0700
commitf85981327a90c51e76f60e073cb6648b2f167226 (patch)
tree7b223478868b18611f824ff35cc19e9d4843d4fa /scripts/lib/kdoc/kdoc_re.py
parent60ef54156148ffaa719845bc5b1fdeafa67763fc (diff)
selftests/bpf: Fix incorrect array size calculation
The loop in bench_sockmap_prog_destroy() has two issues: 1. Using 'sizeof(ctx.fds)' as the loop bound results in the number of bytes, not the number of file descriptors, causing the loop to iterate far more times than intended. 2. The condition 'ctx.fds[0] > 0' incorrectly checks only the first fd for all iterations, potentially leaving file descriptors unclosed. Change it to 'ctx.fds[i] > 0' to check each fd properly. These fixes ensure correct cleanup of all file descriptors when the benchmark exits. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250909124721.191555-1-jiayuan.chen@linux.dev Closes: https://lore.kernel.org/bpf/aLqfWuRR9R_KTe5e@stanley.mountain/
Diffstat (limited to 'scripts/lib/kdoc/kdoc_re.py')
0 files changed, 0 insertions, 0 deletions