linux-stable/io_uring
Jens Axboe a37ee9e117 io_uring/net: fix multishot accept overflow handling
If we hit CQ ring overflow when attempting to post a multishot accept
completion, we don't properly save the result or return code. This
results in losing the accepted fd value.

Instead, we return the result from the poll operation that triggered
the accept retry. This is generally POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND
which is 0xc3, or 195, which looks like a valid file descriptor, but it
really has no connection to that.

Handle this like we do for other multishot completions - assign the
result, and return IOU_STOP_MULTISHOT to cancel any further completions
from this request when overflow is hit. This preserves the result, as we
should, and tells the application that the request needs to be re-armed.

Cc: stable@vger.kernel.org
Fixes: 515e269612 ("io_uring: revert "io_uring fix multishot accept ordering"")
Link: https://github.com/axboe/liburing/issues/1062
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-02-14 18:30:19 -07:00
..
Makefile
advise.c
advise.h
alloc_cache.h
cancel.c
cancel.h
epoll.c
epoll.h
fdinfo.c
fdinfo.h
filetable.c
filetable.h
fs.c
fs.h
futex.c
futex.h
io-wq.c
io-wq.h
io_uring.c for-6.8/io_uring-2024-01-18 2024-01-18 18:17:57 -08:00
io_uring.h io_uring/poll: add requeue return code from poll multishot handling 2024-01-29 13:19:47 -07:00
kbuf.c
kbuf.h
msg_ring.c
msg_ring.h
net.c io_uring/net: fix multishot accept overflow handling 2024-02-14 18:30:19 -07:00
net.h
nop.c
nop.h
notif.c
notif.h
opdef.c io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL 2024-01-23 15:25:14 -07:00
opdef.h
openclose.c io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL 2024-01-23 15:25:14 -07:00
openclose.h
poll.c io_uring/poll: add requeue return code from poll multishot handling 2024-01-29 13:19:47 -07:00
poll.h io_uring/rw: ensure poll based multishot read retries appropriately 2024-01-28 20:37:11 -07:00
refs.h
register.c io_uring/register: guard compat syscall with CONFIG_COMPAT 2024-01-17 09:45:18 -07:00
register.h
rsrc.c
rsrc.h io_uring/rsrc: improve code generation for fixed file assignment 2024-01-11 13:37:31 -07:00
rw.c io_uring/rw: ensure poll based multishot read retries appropriately 2024-01-28 20:37:11 -07:00
rw.h
slist.h
splice.c
splice.h
sqpoll.c
sqpoll.h
statx.c
statx.h
sync.c
sync.h
tctx.c
tctx.h
timeout.c
timeout.h
uring_cmd.c for-6.8/io_uring-2024-01-08 2024-01-11 14:19:23 -08:00
uring_cmd.h
waitid.c
waitid.h
xattr.c
xattr.h