summaryrefslogtreecommitdiff
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-01-16 12:01:26 +0800
committerAlex Shi <alex.shi@linaro.org>2017-01-16 12:01:26 +0800
commit75dd1c226c98dc1b4ad1bcf78746f4843c3fa1c4 (patch)
treeeba1b36d5096b8c56ac96b0544dda12e0bc9e1f0 /net/ipv6/raw.c
parent99d4c5fe0b7838de15c59b375491ef075848d92d (diff)
parentd9ea51a9bea4ed29f8fd9c59a8122c7aabcc5562 (diff)
Merge tag 'v4.4.43' into linux-linaro-lsk-v4.4
This is the 4.4.43 stable release
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 99140986e887..8bca90d6d915 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -589,7 +589,11 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
}
offset += skb_transport_offset(skb);
- BUG_ON(skb_copy_bits(skb, offset, &csum, 2));
+ err = skb_copy_bits(skb, offset, &csum, 2);
+ if (err < 0) {
+ ip6_flush_pending_frames(sk);
+ goto out;
+ }
/* in case cksum was not initialized */
if (unlikely(csum))