Merge tag 'v3.10.96' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / phonet / af_phonet.c
index 5a940dbd74a3bbf6ec3cadb82cbe47a4dbee8f15..f0229223bf914eb7b5f514846de96ca8edf24068 100644 (file)
@@ -377,6 +377,10 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev,
        struct sockaddr_pn sa;
        u16 len;
 
+       skb = skb_share_check(skb, GFP_ATOMIC);
+       if (!skb)
+               return NET_RX_DROP;
+
        /* check we have at least a full Phonet header */
        if (!pskb_pull(skb, sizeof(struct phonethdr)))
                goto out;