summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorHayes Wang <hayeswang@realtek.com>2019-08-19 05:15:19 +0200
committerDavid S. Miller <davem@davemloft.net>2019-08-20 03:13:24 +0200
commit6636fb310681d716f50c2e4064daf44ff358685e (patch)
tree7689494049c94f189bb50ddfacee48620b25657e /drivers/net/usb
parentMerge branch 'RTL8125-EEE' (diff)
downloadlinux-6636fb310681d716f50c2e4064daf44ff358685e.tar.xz
linux-6636fb310681d716f50c2e4064daf44ff358685e.zip
r8152: fix accessing skb after napi_gro_receive
Fix accessing skb after napi_gro_receive which is caused by commit 47922fcde536 ("r8152: support skb_add_rx_frag"). Fixes: 47922fcde536 ("r8152: support skb_add_rx_frag") Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/r8152.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 40d18e866269..b1db6df6f4ab 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -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);
}