From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Yun Lu" <luyun_611@163.com>, <daniel@iogearbox.net>,
<andrii@kernel.org>, <eddyz87@gmail.com>, <memxor@gmail.com>,
<martin.lau@linux.dev>, <song@kernel.org>,
<yonghong.song@linux.dev>, <jolsa@kernel.org>,
<emil@etsalapatis.com>, <ihor.solodrai@linux.dev>
Cc: <yatsenko@meta.com>, <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v5 3/3] selftests/bpf: Add task work scheduling race test
Date: Fri, 02 Oct 2026 11:36:23 +0000 [thread overview]
Message-ID: <DLUBLDLVFYLU.393R1ZG12F4W9@gmail.com> (raw)
In-Reply-To: <20260930085417.186729-4-luyun_611@163.com>
# DECIDE: optional, log accuracy only. 1/3 and 2/3 are unchanged from v4 and fine. Drop pw-bot if you apply 1-2. Delete this line.
On Wed, Sep 30, 2026 at 04:54 PM Yun Lu <luyun_611@163.com> wrote:
> Add cross-CPU stress coverage for the captured-task cancellation and
> irq_work context-reuse fixes in this series. Run scheduling and the
> target callback on different CPUs, rotating through three map-value
> lifetime patterns for 1500 rounds.
This test cannot hit the bug from patch 2.
race_sched_work() is the only caller of bpf_task_work_schedule_signal()
and it runs in the trigger thread only, which is pinned to one cpu.
irq_work_queue() queues on the local cpu, so bpf_task_work_irq()
returns before that thread gets to the next getppid().
irq_work_is_busy() in bpf_task_work_acquire_ctx() is never true here.
The target thread doesn't exit, so task_work_add() never fails either.
Either make the test cover patch 2 or say that it's for patch 1 only.
pw-bot: cr
next prev parent reply other threads:[~2026-10-02 11:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 8:54 [PATCH bpf-next v5 0/3] bpf: Fix task work scheduling races Yun Lu
2026-09-30 8:54 ` [PATCH bpf-next v5 1/3] bpf: Fix NULL task dereference in task work cancellation Yun Lu
2026-09-30 8:54 ` [PATCH bpf-next v5 2/3] bpf: Prevent task work context reuse while irq_work is busy Yun Lu
2026-09-30 8:54 ` [PATCH bpf-next v5 3/3] selftests/bpf: Add task work scheduling race test Yun Lu
2026-10-02 11:36 ` Alexei Starovoitov [this message]
2026-10-09 8:40 ` luyun
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=DLUBLDLVFYLU.393R1ZG12F4W9@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=luyun_611@163.com \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=song@kernel.org \
--cc=yatsenko@meta.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