[PATCH io_uring-7.1 v2 2/5] io_uring/zcrx: don't use mark0 for allocating xarray

Pavel Begunkov
2026-03-25T13:09:22Z

XA_MARK_0 is not compatible with xarray allocating entries, use
XA_MARK_1.

Fixes: fda90d43f4fac ("io_uring/zcrx: return back two step unregistration")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
io_uring/zcrx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 1ce867c68446..dede892bdda9 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -929,12 +929,12 @@ int io_register_zcrx(struct io_ring_ctx *ctx,

static inline bool is_zcrx_entry_marked(struct io_ring_ctx *ctx, unsigned long id)
{
- return xa_get_mark(&ctx->zcrx_ctxs, id, XA_MARK_0);
+ return xa_get_mark(&ctx->zcrx_ctxs, id, XA_MARK_1);
}

static inline void set_zcrx_entry_mark(struct io_ring_ctx *ctx, unsigned long id)
{
- xa_set_mark(&ctx->zcrx_ctxs, id, XA_MARK_0);
+ xa_set_mark(&ctx->zcrx_ctxs, id, XA_MARK_1);
}

void io_terminate_zcrx(struct io_ring_ctx *ctx)
--
2.53.0