aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-04-01 13:36:50 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-01 13:36:50 -0400
commita210576cf891e9e6d2c238eabcf5c1286b1e7526 (patch)
tree0fa81a901cf628b25e6ee79057700cf39e59818a /net/core/dev.c
parent7d4c04fc170087119727119074e72445f2bb192b (diff)
parent3658f3604066d5500ebd73a04084f127dc779441 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/mac80211/sta_info.c net/wireless/core.h Two minor conflicts in wireless. Overlapping additions of extern declarations in net/wireless/core.h and a bug fix overlapping with the addition of a boolean parameter to __ieee80211_key_free(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 2db88dfa99d7..63e25332924d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1624,7 +1624,6 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
1624 } 1624 }
1625 1625
1626 skb_orphan(skb); 1626 skb_orphan(skb);
1627 nf_reset(skb);
1628 1627
1629 if (unlikely(!is_skb_forwardable(dev, skb))) { 1628 if (unlikely(!is_skb_forwardable(dev, skb))) {
1630 atomic_long_inc(&dev->rx_dropped); 1629 atomic_long_inc(&dev->rx_dropped);
@@ -3318,6 +3317,7 @@ int netdev_rx_handler_register(struct net_device *dev,
3318 if (dev->rx_handler) 3317 if (dev->rx_handler)
3319 return -EBUSY; 3318 return -EBUSY;
3320 3319
3320 /* Note: rx_handler_data must be set before rx_handler */
3321 rcu_assign_pointer(dev->rx_handler_data, rx_handler_data); 3321 rcu_assign_pointer(dev->rx_handler_data, rx_handler_data);
3322 rcu_assign_pointer(dev->rx_handler, rx_handler); 3322 rcu_assign_pointer(dev->rx_handler, rx_handler);
3323 3323
@@ -3338,6 +3338,11 @@ void netdev_rx_handler_unregister(struct net_device *dev)
3338 3338
3339 ASSERT_RTNL(); 3339 ASSERT_RTNL();
3340 RCU_INIT_POINTER(dev->rx_handler, NULL); 3340 RCU_INIT_POINTER(dev->rx_handler, NULL);
3341 /* a reader seeing a non NULL rx_handler in a rcu_read_lock()
3342 * section has a guarantee to see a non NULL rx_handler_data
3343 * as well.
3344 */
3345 synchronize_net();
3341 RCU_INIT_POINTER(dev->rx_handler_data, NULL); 3346 RCU_INIT_POINTER(dev->rx_handler_data, NULL);
3342} 3347}
3343EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); 3348EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);