Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db519144 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc36b428
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {