]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv6/raw.c
Merge tag 'drm-fixes-for-v4.10-rc8' of git://people.freedesktop.org/~airlied/linux
[karo-tx-linux.git] / net / ipv6 / raw.c
index 291ebc260e70ef7fbb4310d22ed0c915a372d0b5..ea89073c824747f185beb7da0f4aab6b74832149 100644 (file)
@@ -591,7 +591,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))