Skip to contentSkip to conversation

io_uring/zcrx: clear RQ headers on init

PATCH Applied Pavel Begunkov 2 participants 2 messages Apr 21

Subsystems (4)
lore
Share & tools
lore

Pavel Begunkov

author maintainer
#0 lore raw

PATCH 1/1 io_uring/zcrx: clear RQ headers on init

It might be unexpected to users if the RQ head/tail after a ring creation are not zeroed, fix that.

Fixes 6f377873cb239 ("io_uring/zcrx: add interface queue and refill queue")
---
 io_uring/zcrx.c | 1 +
 1 file changed, 1 insertion(+)
io_uring/zcrx.c +1 -0
index fab3693ecb0d..2eb09219f0a0 100644
@@ -396,6 +396,7 @@ static int io_allocate_rbuf_ring(struct io_ring_ctx *ctx,
 	ifq->rq.ring = (struct io_uring *)ptr;
 	ifq->rq.rqes = (struct io_uring_zcrx_rqe *)(ptr + off);
 
+	memset(ifq->rq.ring, 0, sizeof(*ifq->rq.ring));
 	return 0;
 }
 
Signature · 1 line
2.53.0
maintainer Applied
#1 lore raw
Quoted 2 lines · Pavel Begunkov

It might be unexpected to users if the RQ head/tail after a ring creation are not zeroed, fix that.

Applied, thanks!

[1/1] io_uring/zcrx: clear RQ headers on init

      commit: 8138b7257581dee3da288c4f2a53ab603e05b1da

Best regards,

Signature · 1 line
Jens Axboe