diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-07 05:25:44 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-24 12:28:48 +0300 |
commit | 6ce8e9ce5989ae13f493062975304700be86d20e (patch) | |
tree | b714f34723d37ccd90bb5350555cbfe9dc8b9abe /net/packet | |
parent | 227158db160449b6513d2e31894a135104b90e90 (diff) | |
download | linux-6ce8e9ce5989ae13f493062975304700be86d20e.tar.xz |
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.c | 5 |
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; |