]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/usb/r8152.c
r8152: fix accessing skb after napi_gro_receive
[linux.git] / drivers / net / usb / r8152.c
index 40d18e866269d594c4f406a366b07588ebe36f44..b1db6df6f4ab9b4d35d0633df8de002b1ca2a001 100644 (file)
@@ -2094,10 +2094,10 @@ static int rx_bottom(struct r8152 *tp, int budget)
                        skb->protocol = eth_type_trans(skb, netdev);
                        rtl_rx_vlan_tag(rx_desc, skb);
                        if (work_done < budget) {
-                               napi_gro_receive(napi, skb);
                                work_done++;
                                stats->rx_packets++;
                                stats->rx_bytes += skb->len;
+                               napi_gro_receive(napi, skb);
                        } else {
                                __skb_queue_tail(&tp->rx_queue, skb);
                        }