Skip to content

Commit 4f02cc4

Browse files
isilenceaxboe
authored andcommitted
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. Cc: [email protected] Fixes: 6f37787 ("io_uring/zcrx: add interface queue and refill queue") Signed-off-by: Pavel Begunkov <[email protected]> Link: https://patch.msgid.link/331f94663c3e8f021ffa3cb770ca2844a07d4855.1776760911.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 0fcccfd commit 4f02cc4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

io_uring/zcrx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ static int io_allocate_rbuf_ring(struct io_ring_ctx *ctx,
396396
ifq->rq.ring = (struct io_uring *)ptr;
397397
ifq->rq.rqes = (struct io_uring_zcrx_rqe *)(ptr + off);
398398

399+
memset(ifq->rq.ring, 0, sizeof(*ifq->rq.ring));
399400
return 0;
400401
}
401402

0 commit comments

Comments
 (0)