diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-06 21:25:44 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-24 04:28:48 -0500 |
commit | 6ce8e9ce5989ae13f493062975304700be86d20e (patch) | |
tree | b714f34723d37ccd90bb5350555cbfe9dc8b9abe /net/packet | |
parent | 227158db160449b6513d2e31894a135104b90e90 (diff) |
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: | |||
1676 | if (len < hhlen) | 1676 | if (len < hhlen) |
1677 | skb_reset_network_header(skb); | 1677 | skb_reset_network_header(skb); |
1678 | } | 1678 | } |
1679 | err = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len); | 1679 | err = memcpy_from_msg(skb_put(skb, len), msg, len); |
1680 | if (err) | 1680 | if (err) |
1681 | goto out_free; | 1681 | goto out_free; |
1682 | goto retry; | 1682 | goto retry; |
@@ -2446,8 +2446,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len) | |||
2446 | 2446 | ||
2447 | len -= vnet_hdr_len; | 2447 | len -= vnet_hdr_len; |
2448 | 2448 | ||
2449 | err = memcpy_fromiovec((void *)&vnet_hdr, msg->msg_iov, | 2449 | err = memcpy_from_msg((void *)&vnet_hdr, msg, vnet_hdr_len); |
2450 | vnet_hdr_len); | ||
2451 | if (err < 0) | 2450 | if (err < 0) |
2452 | goto out_unlock; | 2451 | goto out_unlock; |
2453 | 2452 | ||