vlan: fix u64_stats
Subsystems (2)
PATCH 1/1 vlan: fix u64_stats
rx_stats->rx_errors should be under the protection of rx_stats->syncp.
Signed-off-by Changli Gao <[email protected]>
----
net/8021q/vlan_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/8021q/vlan_dev.c +2 -1
@@ -211,7 +211,6 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,default :break ; } -u64_stats_update_end (&rx_stats->syncp); }skb_pull_rcsum (skb,VLAN_HLEN );
@@ -221,8 +220,10 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, skb =vlan_check_reorder_header (skb);if (!skb) { rx_stats->rx_errors++; +u64_stats_update_end (&rx_stats->syncp); goto err_unlock; } +u64_stats_update_end (&rx_stats->syncp); }netif_rx (skb);
Quoted 2 lines · Changli Gao
rx_stats->rx_errorsshould be under the protection ofrx_stats->syncp.
I checked the code again. rx_errors is unsigned long, so need no protection. Sorry for the noise.
Signature · 2 lines
Regards, Changli Gao([email protected])