Message ID | 1280293833-8723-1-git-send-email-xiaosuo@gmail.com |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Jul 28, 2010 at 1:10 PM, Changli Gao <xiaosuo@gmail.com> wrote: > rx_stats->rx_errors should be under the protection of rx_stats->syncp. > I checked the code again. rx_errors is unsigned long, so need no protection. Sorry for the noise.
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);
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(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html