Message ID | 161917591778.102337.1084869564077259501.stgit@toke.dk (mailing list archive) |
---|---|
State | RFC |
Delegated to: | BPF |
Headers | show |
Series | Clean up and document RCU-based object protection for XDP_REDIRECT | expand |
diff --git a/net/core/dev.c b/net/core/dev.c index b4c67a5be606..a7b8e3289f7c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1002,7 +1002,7 @@ struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex) struct net_device *dev; struct hlist_head *head = dev_index_hash(net, ifindex); - hlist_for_each_entry_rcu(dev, head, index_hlist) + hlist_for_each_entry_rcu(dev, head, index_hlist, rcu_read_lock_bh_held()) if (dev->ifindex == ifindex) return dev;