diff options
-rw-r--r-- | net/sched/em_meta.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 8e8d836f00c0..24dce8b648a4 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -310,7 +310,8 @@ META_COLLECTOR(var_sk_bound_if) | |||
310 | struct net_device *dev; | 310 | struct net_device *dev; |
311 | 311 | ||
312 | rcu_read_lock(); | 312 | rcu_read_lock(); |
313 | dev = dev_get_by_index_rcu(&init_net, skb->sk->sk_bound_dev_if); | 313 | dev = dev_get_by_index_rcu(sock_net(skb->sk), |
314 | skb->sk->sk_bound_dev_if); | ||
314 | *err = var_dev(dev, dst); | 315 | *err = var_dev(dev, dst); |
315 | rcu_read_unlock(); | 316 | rcu_read_unlock(); |
316 | } | 317 | } |