linux/io_uring
Pavel Begunkov 6a1d1365fa io_uring/net: fix iter retargeting for selected buf
commit c21a8027ad8a68c340d0d58bf1cc61dcb0bc4d2f upstream.

When using selected buffer feature, io_uring delays data iter setup
until later. If io_setup_async_msg() is called before that it might see
not correctly setup iterator. Pre-init nr_segs and judge from its state
whether we repointing.

Cc: stable@vger.kernel.org
Reported-by: syzbot+a4c6e5ef999b68b26ed1@syzkaller.appspotmail.com
Fixes: 0455d4ccec548 ("io_uring: add POLL_FIRST support for send/sendmsg and recv/recvmsg")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/0000000000002770be06053c7757@google.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 11:11:10 +02:00
..
2022-08-12 17:01:00 -06:00
2023-08-30 16:11:04 +02:00
2022-09-21 13:15:02 -06:00
2023-08-30 16:11:04 +02:00
2023-05-11 23:03:24 +09:00
2022-10-07 12:25:30 -06:00
2022-09-01 17:39:05 -04:00