Patchwork [net-next] ifb: dont hard code inet_net use

login
register
mail settings
Submitter Eric Dumazet
Date Jan. 13, 2013, 5:46 p.m.
Message ID <1358099194.8744.311.camel@edumazet-glaptop>
Download mbox | patch
Permalink /patch/211643/
State Accepted
Delegated to: David Miller
Headers show

Comments

Eric Dumazet - Jan. 13, 2013, 5:46 p.m.
From: Eric Dumazet <edumazet@google.com>

ifb should lookup devices in the appropriate namespace.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
---
 drivers/net/ifb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
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
Jamal Hadi Salim - Jan. 14, 2013, 1:13 p.m.
On 13-01-13 12:46 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> ifb should lookup devices in the appropriate namespace.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>


  Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

cheers,
jamal
--
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
David Miller - Jan. 14, 2013, 8:13 p.m.
From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: Mon, 14 Jan 2013 08:13:45 -0500

> On 13-01-13 12:46 PM, Eric Dumazet wrote:
>> From: Eric Dumazet <edumazet@google.com>
>>
>> ifb should lookup devices in the appropriate namespace.
>>
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> 
>  Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Jamal, please don't put leading whitespace in your
signoffs and acks, the automated tools that look for
these tags in email threads looks for them to start in
the first column.

I've applied this patch, thanks.

Thanks.
--
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

Patch

diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 344dceb..8216438 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -90,7 +90,7 @@  static void ri_tasklet(unsigned long dev)
 		u64_stats_update_end(&dp->tsync);
 
 		rcu_read_lock();
-		skb->dev = dev_get_by_index_rcu(&init_net, skb->skb_iif);
+		skb->dev = dev_get_by_index_rcu(dev_net(_dev), skb->skb_iif);
 		if (!skb->dev) {
 			rcu_read_unlock();
 			dev_kfree_skb(skb);