From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Cc: bpf@vger.kernel.org, Alexei Starovoitov <alexei.starovoitov@gmail.com>
Subject: Re: [PATCH v5 4/5] io_uring/bpf-ops: implement bpf ops registration
Date: Wed, 11 Feb 2026 15:40:51 +0000 [thread overview]
Message-ID: <8bdb51d2-0935-41ba-bca6-c9d575c7ae99@gmail.com> (raw)
In-Reply-To: <55db7c09-5bc8-4dda-818d-53130400ee50@kernel.dk>
On 2/11/26 15:21, Jens Axboe wrote:
> On 2/11/26 7:32 AM, Pavel Begunkov wrote:
>> +static void io_eject_bpf(struct io_ring_ctx *ctx)
>> +{
>> + struct io_uring_bpf_ops *ops = ctx->bpf_ops;
>> +
>> + if (!WARN_ON_ONCE(!ops))
>> + return;
>
> if (WARN_ON_ONCE(!ops))
> return;
>
> ?
Good catch! I even lightly tested it before, but seems like
there is a delay before the program is actually destroyed
and you could still call the function without crashing.
I'll add it to selftests.
--
Pavel Begunkov
next prev parent reply other threads:[~2026-02-11 15:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 14:32 [PATCH io_uring-7.1 v5 0/5] BPF controlled io_uring Pavel Begunkov
2026-02-11 14:32 ` [PATCH v5 1/5] io_uring: introduce callback driven main loop Pavel Begunkov
2026-02-11 14:32 ` [PATCH v5 2/5] io_uring/bpf-ops: implement loop_step with BPF struct_ops Pavel Begunkov
2026-02-11 14:32 ` [PATCH v5 3/5] io_uring/bpf-ops: add kfunc helpers Pavel Begunkov
2026-02-11 14:32 ` [PATCH v5 4/5] io_uring/bpf-ops: implement bpf ops registration Pavel Begunkov
2026-02-11 15:21 ` Jens Axboe
2026-02-11 15:40 ` Pavel Begunkov [this message]
2026-02-11 14:32 ` [PATCH v5 5/5] selftests/io_uring: add a bpf io_uring selftest Pavel Begunkov
2026-02-11 15:22 ` Jens Axboe
2026-02-11 15:24 ` [PATCH io_uring-7.1 v5 0/5] BPF controlled io_uring Jens Axboe
2026-02-11 18:58 ` Pavel Begunkov
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=8bdb51d2-0935-41ba-bca6-c9d575c7ae99@gmail.com \
--to=asml.silence@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=axboe@kernel.dk \
--cc=bpf@vger.kernel.org \
--cc=io-uring@vger.kernel.org \
/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