diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-09-20 15:18:54 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-09-20 15:18:54 +0800 |
commit | 5f87c475f82a75e10bc6e249b7471349f1ef1636 (patch) | |
tree | df697b570c923c722b5ba24f502c6abdbb5e05f1 /net/ipv4/udp.c | |
parent | d3a1d035ef89cfb89cf6e2128d44b95771f2c7b4 (diff) | |
parent | d2d693d1ba7d93ec7c5db8aca2da29a4c91f6782 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Conflicts:
in fs/proc/task_mmu.c:
looks like vma_get_anon_name() want have a name for anonymous
vma when there is no name used in vma. commit: 586278d78bf
The name show is after any other names, so it maybe covered.
but anyway, it just a show here.
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 7473dad69c92..037a29ab00f0 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1276,6 +1276,7 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock, int peeked, off = 0; int err; int is_udplite = IS_UDPLITE(sk); + bool checksum_valid = false; bool slow; if (flags & MSG_ERRQUEUE) @@ -1301,11 +1302,12 @@ try_again: */ if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { - if (udp_lib_checksum_complete(skb)) + checksum_valid = !udp_lib_checksum_complete(skb); + if (!checksum_valid) goto csum_copy_err; } - if (skb_csum_unnecessary(skb)) + if (checksum_valid || skb_csum_unnecessary(skb)) err = skb_copy_datagram_msg(skb, sizeof(struct udphdr), msg, copied); else { |