Re: [PATCH] io_uring/bpf-ops: reject re-registration of an already-bound ops
Jens Axboe <[email protected]> Fri, 17 Jul 2026 11:05:49 -0600
| Newsgroups | org.kernel.vger.io-uring |
|---|---|
| Message-ID | <178430794942.612136.17341597926456772378.b4-ty@b4> |
On Fri, 17 Jul 2026 22:45:37 +0700, Woraphat Khiaodaeng wrote:
> io_install_bpf() only rejects a second registration on the ctx side
> (ctx->bpf_ops) and sets the per-map back-pointer ops->priv
> unconditionally. The struct_ops link path never advances a map past
> BPF_STRUCT_OPS_STATE_READY, so the same io_uring_bpf_ops map can be
> registered more than once, and bpf_io_reg() re-resolves the target ring
> via fget(ops->ring_fd) on every call. A caller can therefore point the
> same ring_fd at a different io_ring_ctx between two BPF_LINK_CREATE
> calls.
>
> [...]
Applied, thanks!
[1/1] io_uring/bpf-ops: reject re-registration of an already-bound ops
commit: 83d2280089bd45e5f782011275b5c7414d85cb2b
Best regards,
--
Jens Axboe