summaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-04-06 21:25:44 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-24 04:28:48 -0500
commit6ce8e9ce5989ae13f493062975304700be86d20e (patch)
treeb714f34723d37ccd90bb5350555cbfe9dc8b9abe /net/packet
parent227158db160449b6513d2e31894a135104b90e90 (diff)
downloadlinux-6ce8e9ce5989ae13f493062975304700be86d20e.tar.gz
linux-6ce8e9ce5989ae13f493062975304700be86d20e.tar.bz2
linux-6ce8e9ce5989ae13f493062975304700be86d20e.zip
new helper: memcpy_from_msg()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 58af58026dd2..07ac95014ecb 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1676,7 +1676,7 @@ retry:
if (len < hhlen)
skb_reset_network_header(skb);
}
- err = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len);
+ err = memcpy_from_msg(skb_put(skb, len), msg, len);
if (err)
goto out_free;
goto retry;
@@ -2446,8 +2446,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
len -= vnet_hdr_len;
- err = memcpy_fromiovec((void *)&vnet_hdr, msg->msg_iov,
- vnet_hdr_len);
+ err = memcpy_from_msg((void *)&vnet_hdr, msg, vnet_hdr_len);
if (err < 0)
goto out_unlock;