mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: yangfeng59949@163.com,andrii@kernel.org,eddyz87@gmail.com,ast@kernel.org,daniel@iogearbox.net,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,jolsa@kernel.org,emil@etsalapatis.com
Cc: bpf@vger.kernel.org,linux-kselftest@vger.kernel.org,linux-kernel@vger.kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,clm@meta.com,ihor.solodrai@linux.dev
Subject: Re: [PATCH v2 bpf-next 2/5] selftests/bpf: Fix missing allocation null checks in test_progs.c
Date: Wed, 22 Jul 2026 08:45:43 +0000 (UTC)	[thread overview]
Message-ID: <6c06c31fa22bf40aa0e9d28ed5ffe58232c2a9d83280f096341de44ca236d1a7@mail.kernel.org> (raw)
In-Reply-To: <20260722074748.674080-3-yangfeng59949@163.com>

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

>     selftests/bpf: Fix missing allocation null checks in test_progs.c
>
>     Add null checks after memory allocations to prevent potential segmentation faults.
>
>     Signed-off-by: Feng Yang <yangfeng@kylinos.cn>

This looks like a bug fix, but there is no Fixes: tag.  Most of the
corrected allocation sites (dispatcher_threads, data, and
env.worker_current_test in server_main(), and env.worker_pids and
env.worker_socks in main()) were added without null checks when the
parallel worker infrastructure went in.  Should this carry:

  Fixes: 91b2c0afd00c ("selftests/bpf: Add parallelism to test_progs")

The change also touches two allocation sites from other commits, the
val_buf1/val_buf2 checks in compare_stack_ips() and the
state->subtest_states check in dispatch_thread_send_subtests(), so more
than one Fixes: tag may be warranted, but 91b2c0afd00c covers the bulk
of the change.


---
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/29903681308

  reply	other threads:[~2026-07-22  8:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  7:47 [PATCH v2 bpf-next 0/5] Fix several issues " Feng Yang
2026-07-22  7:47 ` [PATCH v2 bpf-next 1/5] selftests/bpf: Fix double free of subtest_state->name Feng Yang
2026-07-22  7:47 ` [PATCH v2 bpf-next 2/5] selftests/bpf: Fix missing allocation null checks in test_progs.c Feng Yang
2026-07-22  8:45   ` bot+bpf-ci [this message]
2026-07-22  7:47 ` [PATCH v2 bpf-next 3/5] selftests/bpf: Use calloc to allocate subtest_states Feng Yang
2026-07-22  7:47 ` [PATCH v2 bpf-next 4/5] selftests/bpf: Fix memory leak on subtest_states reallocation Feng Yang
2026-07-22  7:47 ` [PATCH v2 bpf-next 5/5] selftests/bpf: Fix potential NULL pointer dereference in strscpy call Feng Yang
2026-07-24 21:33 ` [PATCH v2 bpf-next 0/5] Fix several issues in test_progs.c patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c06c31fa22bf40aa0e9d28ed5ffe58232c2a9d83280f096341de44ca236d1a7@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    --cc=yangfeng59949@163.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®