summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-20 04:35:50 +0200
committerDavid S. Miller <davem@davemloft.net>2009-10-23 06:54:19 +0200
commitdb519144243de6b17ff0c56c26f06059743110a7 (patch)
treef758c88e703bf2064454c45c439bb0428fb57db3
parentnet: au1000_eth: add missing capability.h (diff)
downloadlinux-db519144243de6b17ff0c56c26f06059743110a7.tar.xz
linux-db519144243de6b17ff0c56c26f06059743110a7.zip
ifb: should not use __dev_get_by_index() without locks
At this point (ri_tasklet()), RTNL or dev_base_lock are not held, we must use dev_get_by_index() instead of __dev_get_by_index() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ifb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 801f088c134f..030913f8bd26 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -98,12 +98,13 @@ static void ri_tasklet(unsigned long dev)
stats->tx_packets++;
stats->tx_bytes +=skb->len;
- skb->dev = __dev_get_by_index(&init_net, skb->iif);
+ skb->dev = dev_get_by_index(&init_net, skb->iif);
if (!skb->dev) {
dev_kfree_skb(skb);
stats->tx_dropped++;
break;
}
+ dev_put(skb->dev);
skb->iif = _dev->ifindex;
if (from & AT_EGRESS) {