Skip to content

Commit 6636fb3

Browse files
hayesorzdavem330
authored andcommitted
r8152: fix accessing skb after napi_gro_receive
Fix accessing skb after napi_gro_receive which is caused by commit 47922fc ("r8152: support skb_add_rx_frag"). Fixes: 47922fc ("r8152: support skb_add_rx_frag") Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 44b3769 commit 6636fb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/r8152.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2094,10 +2094,10 @@ static int rx_bottom(struct r8152 *tp, int budget)
20942094
skb->protocol = eth_type_trans(skb, netdev);
20952095
rtl_rx_vlan_tag(rx_desc, skb);
20962096
if (work_done < budget) {
2097-
napi_gro_receive(napi, skb);
20982097
work_done++;
20992098
stats->rx_packets++;
21002099
stats->rx_bytes += skb->len;
2100+
napi_gro_receive(napi, skb);
21012101
} else {
21022102
__skb_queue_tail(&tp->rx_queue, skb);
21032103
}

0 commit comments

Comments
 (0)