Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/zcrx: remove sqe->file_index check

sqe->file_index and sqe->zcrx_ifq_idx are aliased, so even though
io_recvzc_prep() has all necessary handling and checking for
->zcrx_ifq_idx, it's already rejected a couple of lines above.

It's not a real problem, however, as we can only have one ifq at the
moment, which index is always zero, and it returns correct error
codes to the user.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b51acedd326d1a87bf53e33303e6fc87661a3e3f.1745141261.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
59bc1ab9 a79154ae

+1 -2
+1 -2
io_uring/net.c
··· 1185 1185 struct io_recvzc *zc = io_kiocb_to_cmd(req, struct io_recvzc); 1186 1186 unsigned ifq_idx; 1187 1187 1188 - if (unlikely(sqe->file_index || sqe->addr2 || sqe->addr || 1189 - sqe->addr3)) 1188 + if (unlikely(sqe->addr2 || sqe->addr || sqe->addr3)) 1190 1189 return -EINVAL; 1191 1190 1192 1191 ifq_idx = READ_ONCE(sqe->zcrx_ifq_idx);