mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
Merge tag 'io_uring-6.6-2023-09-15' of git://git.kernel.dk/linux
Pull io_uring fix from Jens Axboe: "Just a single fix, fixing a regression with poll first, recvmsg, and using a provided buffer" * tag 'io_uring-6.6-2023-09-15' of git://git.kernel.dk/linux: io_uring/net: fix iter retargeting for selected buf
This commit is contained in:
@@ -183,6 +183,10 @@ static int io_setup_async_msg(struct io_kiocb *req,
|
||||
memcpy(async_msg, kmsg, sizeof(*kmsg));
|
||||
if (async_msg->msg.msg_name)
|
||||
async_msg->msg.msg_name = &async_msg->addr;
|
||||
|
||||
if ((req->flags & REQ_F_BUFFER_SELECT) && !async_msg->msg.msg_iter.nr_segs)
|
||||
return -EAGAIN;
|
||||
|
||||
/* if were using fast_iov, set it to the new one */
|
||||
if (iter_is_iovec(&kmsg->msg.msg_iter) && !kmsg->free_iov) {
|
||||
size_t fast_idx = iter_iov(&kmsg->msg.msg_iter) - kmsg->fast_iov;
|
||||
@@ -542,6 +546,7 @@ static int io_recvmsg_copy_hdr(struct io_kiocb *req,
|
||||
struct io_async_msghdr *iomsg)
|
||||
{
|
||||
iomsg->msg.msg_name = &iomsg->addr;
|
||||
iomsg->msg.msg_iter.nr_segs = 0;
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (req->ctx->compat)
|
||||
|
||||
Reference in New Issue
Block a user