Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git] / net / core / skbuff.c
index 35d9d59..48ecfbf 100644 (file)
@@ -4206,9 +4206,8 @@ normal:
                                SKB_GSO_CB(nskb)->csum_start =
                                        skb_headroom(nskb) + doffset;
                        } else {
-                               skb_copy_bits(head_skb, offset,
-                                             skb_put(nskb, len),
-                                             len);
+                               if (skb_copy_bits(head_skb, offset, skb_put(nskb, len), len))
+                                       goto err;
                        }
                        continue;
                }
@@ -4799,7 +4798,7 @@ static bool skb_may_tx_timestamp(struct sock *sk, bool tsonly)
 {
        bool ret;
 
-       if (likely(sysctl_tstamp_allow_data || tsonly))
+       if (likely(READ_ONCE(sysctl_tstamp_allow_data) || tsonly))
                return true;
 
        read_lock_bh(&sk->sk_callback_lock);