net.c (8ba264f418f734aade3a77086bb1d51d0e2723ce) | net.c (de4f5fed3f231a8ff4790bf52975f847b95b85ea) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/kernel.h> 3#include <linux/errno.h> 4#include <linux/file.h> 5#include <linux/slab.h> 6#include <linux/net.h> 7#include <linux/compat.h> 8#include <net/compat.h> --- 170 unchanged lines hidden (view full) --- 179 return -ENOMEM; 180 } 181 req->flags |= REQ_F_NEED_CLEANUP; 182 memcpy(async_msg, kmsg, sizeof(*kmsg)); 183 if (async_msg->msg.msg_name) 184 async_msg->msg.msg_name = &async_msg->addr; 185 /* if were using fast_iov, set it to the new one */ 186 if (iter_is_iovec(&kmsg->msg.msg_iter) && !kmsg->free_iov) { | 1// SPDX-License-Identifier: GPL-2.0 2#include <linux/kernel.h> 3#include <linux/errno.h> 4#include <linux/file.h> 5#include <linux/slab.h> 6#include <linux/net.h> 7#include <linux/compat.h> 8#include <net/compat.h> --- 170 unchanged lines hidden (view full) --- 179 return -ENOMEM; 180 } 181 req->flags |= REQ_F_NEED_CLEANUP; 182 memcpy(async_msg, kmsg, sizeof(*kmsg)); 183 if (async_msg->msg.msg_name) 184 async_msg->msg.msg_name = &async_msg->addr; 185 /* if were using fast_iov, set it to the new one */ 186 if (iter_is_iovec(&kmsg->msg.msg_iter) && !kmsg->free_iov) { |
187 size_t fast_idx = kmsg->msg.msg_iter.iov - kmsg->fast_iov; 188 async_msg->msg.msg_iter.iov = &async_msg->fast_iov[fast_idx]; | 187 size_t fast_idx = iter_iov(&kmsg->msg.msg_iter) - kmsg->fast_iov; 188 async_msg->msg.msg_iter.__iov = &async_msg->fast_iov[fast_idx]; |
189 } 190 191 return -EAGAIN; 192} 193 194static int io_sendmsg_copy_hdr(struct io_kiocb *req, 195 struct io_async_msghdr *iomsg) 196{ --- 1302 unchanged lines hidden --- | 189 } 190 191 return -EAGAIN; 192} 193 194static int io_sendmsg_copy_hdr(struct io_kiocb *req, 195 struct io_async_msghdr *iomsg) 196{ --- 1302 unchanged lines hidden --- |