diff mbox

[net-next-2.6] netsched: Allow var_sk_bound_if meta to work on all namespaces

Message ID 4B048A41.7090103@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Nov. 18, 2009, 11:58 p.m. UTC
This fix can probably wait 2.6.33, or should use another patch
if needed in 2.6.32 (no get_dev_by_index_rcu() before 2.6.33)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Nov. 19, 2009, 6:29 a.m. UTC | #1
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 19 Nov 2009 00:58:57 +0100

> This fix can probably wait 2.6.33, or should use another patch
> if needed in 2.6.32 (no get_dev_by_index_rcu() before 2.6.33)
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

I'll add this to net-next-2.6, thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index 8e8d836..24dce8b 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -310,7 +310,8 @@  META_COLLECTOR(var_sk_bound_if)
 		struct net_device *dev;
 
 		rcu_read_lock();
-		dev = dev_get_by_index_rcu(&init_net, skb->sk->sk_bound_dev_if);
+		dev = dev_get_by_index_rcu(sock_net(skb->sk),
+					   skb->sk->sk_bound_dev_if);
 		*err = var_dev(dev, dst);
 		rcu_read_unlock();
 	}