diff options
Diffstat (limited to 'kernel/net/ipv6/raw.c')
-rw-r--r-- | kernel/net/ipv6/raw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/net/ipv6/raw.c b/kernel/net/ipv6/raw.c index 99140986e..8bca90d6d 100644 --- a/kernel/net/ipv6/raw.c +++ b/kernel/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)) |