Skip to content

Commit bdc0d47

Browse files
isilenceaxboe
authored andcommitted
io_uring/zcrx: replace memchar_inv with is_zero
memchr_inv() is more ambiguous than mem_is_zero(), so use the latter for zero checks. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 9eb3c57 commit bdc0d47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/zcrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
566566
return -EFAULT;
567567
if (copy_from_user(&rd, u64_to_user_ptr(reg.region_ptr), sizeof(rd)))
568568
return -EFAULT;
569-
if (memchr_inv(&reg.__resv, 0, sizeof(reg.__resv)) ||
569+
if (!mem_is_zero(&reg.__resv, sizeof(reg.__resv)) ||
570570
reg.__resv2 || reg.zcrx_id)
571571
return -EINVAL;
572572
if (reg.if_rxq == -1 || !reg.rq_entries || reg.flags)

0 commit comments

Comments
 (0)