aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_device.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-03 01:22:46 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-03 01:22:46 -0400
commit00dad5e479531e379aba7358600cc768725d4f1f (patch)
tree652199eacee32c2cf317f5a54da8265973d29978 /net/bridge/br_device.c
parentc477d0447db08068a497e7beb892b2b2a7bff64b (diff)
parent3a3dfb062c2e086c202d34f09ce29634515ad256 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/e1000e/hw.h net/bridge/br_device.c net/bridge/br_input.c
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r--net/bridge/br_device.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 075c435ad22d..cf09fe591fc2 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -22,7 +22,7 @@
22#include <asm/uaccess.h> 22#include <asm/uaccess.h>
23#include "br_private.h" 23#include "br_private.h"
24 24
25/* net device transmit always called with no BH (preempt_disabled) */ 25/* net device transmit always called with BH disabled */
26netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) 26netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
27{ 27{
28 struct net_bridge *br = netdev_priv(dev); 28 struct net_bridge *br = netdev_priv(dev);
@@ -48,13 +48,16 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
48 skb_reset_mac_header(skb); 48 skb_reset_mac_header(skb);
49 skb_pull(skb, ETH_HLEN); 49 skb_pull(skb, ETH_HLEN);
50 50
51 rcu_read_lock();
51 if (is_multicast_ether_addr(dest)) { 52 if (is_multicast_ether_addr(dest)) {
52 if (unlikely(netpoll_tx_running(dev))) { 53 if (unlikely(netpoll_tx_running(dev))) {
53 br_flood_deliver(br, skb); 54 br_flood_deliver(br, skb);
54 goto out; 55 goto out;
55 } 56 }
56 if (br_multicast_rcv(br, NULL, skb)) 57 if (br_multicast_rcv(br, NULL, skb)) {
58 kfree_skb(skb);
57 goto out; 59 goto out;
60 }
58 61
59 mdst = br_mdb_get(br, skb); 62 mdst = br_mdb_get(br, skb);
60 if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) 63 if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
@@ -67,6 +70,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
67 br_flood_deliver(br, skb); 70 br_flood_deliver(br, skb);
68 71
69out: 72out:
73 rcu_read_unlock();
70 return NETDEV_TX_OK; 74 return NETDEV_TX_OK;
71} 75}
72 76