mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-12 01:20:14 +00:00
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>
This commit is contained in:
parent
9eb3c57178
commit
bdc0d478a1
@ -566,7 +566,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
|
||||
return -EFAULT;
|
||||
if (copy_from_user(&rd, u64_to_user_ptr(reg.region_ptr), sizeof(rd)))
|
||||
return -EFAULT;
|
||||
if (memchr_inv(®.__resv, 0, sizeof(reg.__resv)) ||
|
||||
if (!mem_is_zero(®.__resv, sizeof(reg.__resv)) ||
|
||||
reg.__resv2 || reg.zcrx_id)
|
||||
return -EINVAL;
|
||||
if (reg.if_rxq == -1 || !reg.rq_entries || reg.flags)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user