Netdev List
 help / color / mirror / Atom feed
* [PATCH] vlan: fix u64_stats
@ 2010-07-28  5:10 Changli Gao
  2010-07-28  8:41 ` Changli Gao
  0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2010-07-28  5:10 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David S. Miller, netdev, Changli Gao

rx_stats->rx_errors should be under the protection of rx_stats->syncp.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 net/8021q/vlan_dev.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 3d59c9b..d70d31a 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-28  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28  5:10 [PATCH] vlan: fix u64_stats Changli Gao
2010-07-28  8:41 ` Changli Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox