net: switch memcpy_fromiovec()/memcpy_fromiovecend() users to copy_from_iter()
That takes care of the majority of ->sendmsg() instances - most of them via memcpy_to_msg() or assorted getfrag() callbacks. One place where we still keep memcpy_fromiovecend() is tipc - there we potentially read the same data over and over; separate patch, that... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -2692,8 +2692,7 @@ int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci);
|
||||
|
||||
static inline int memcpy_from_msg(void *data, struct msghdr *msg, int len)
|
||||
{
|
||||
/* XXX: stripping const */
|
||||
return memcpy_fromiovec(data, (struct iovec *)msg->msg_iter.iov, len);
|
||||
return copy_from_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
|
||||
}
|
||||
|
||||
static inline int memcpy_to_msg(struct msghdr *msg, void *data, int len)
|
||||
|
Reference in New Issue
Block a user