Pavel Begunkov c21a8027ad io_uring/net: fix iter retargeting for selected buf
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>
2023-09-14 10:12:55 -06:00
..
2022-12-07 06:47:13 -07:00
2022-07-24 18:39:11 -06:00
2023-05-04 08:19:05 -06:00
2023-01-29 15:17:41 -07:00
2023-08-11 10:42:57 -06:00
2022-07-24 18:39:14 -06:00
2023-08-29 20:11:33 -07:00
2023-08-10 10:24:25 -06:00
2023-08-11 10:42:57 -06:00