staging: r8712u: Do not queue cloned skb
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 26 Sep 2012 19:01:31 +0000 (14:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2012 20:05:50 +0000 (13:05 -0700)
Some post-3.4 kernels have a problem when a cloned skb is used in the
RX path. This patch handles one such case for r8712u.

The patch was suggested by Eric Dumazet.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_recv.c

index 4cd297aed78854e89af8ebeb1103da9ab7245ab2..c76732cdb183f0a9653f7b4e3d1248707997d9f7 100644 (file)
@@ -1131,6 +1131,9 @@ static void recv_tasklet(void *priv)
                recvbuf2recvframe(padapter, pskb);
                skb_reset_tail_pointer(pskb);
                pskb->len = 0;
-               skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb);
+               if (!skb_cloned(pskb))
+                       skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb);
+               else
+                       consume_skb(pskb);
        }
 }