net: switch memcpy_fromiovec()/memcpy_fromiovecend() users to copy_from_iter()
[pandora-kernel.git] / include / linux / skbuff.h
index 9a8bafe..b349c96 100644 (file)
@@ -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)