From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: Eric Dumazet <eric.dumazet@gmail•com>,
Cong Wang <xiyou.wangcong@gmail•com>
Cc: netdev@vger•kernel.org
Subject: Re: [Patch net] netns: avoid allocating idr when dumping info
Date: Fri, 27 Feb 2015 17:25:57 +0100 [thread overview]
Message-ID: <54F09A95.8000507@6wind.com> (raw)
In-Reply-To: <1425024069.5130.10.camel@edumazet-glaptop2.roam.corp.google.com>
Le 27/02/2015 09:01, Eric Dumazet a écrit :
> On Thu, 2015-02-26 at 22:32 -0800, Cong Wang wrote:
>> We can allocate the peer netns id when creating the link
>> instead of when dumping the link.
>>
>> This fixes the following kernel warning:
>>
>> ===============================
>> [ INFO: suspicious RCU usage. ]
>> 3.19.0+ #805 Tainted: G W
>> -------------------------------
>> include/linux/rcupdate.h:538 Illegal context switch in RCU read-side critical section!
>>
>> other info that might help us debug this:
>
> This looks very complicated, why even bother ?
>
> I gave an obvious patch fixing root cause, I have no idea why you prefer
> over engineering this.
>
> If you believe allocating peer netns id is required at link creation
> time, you should explain why.
>
> BTW, (void)peernet2id(dev_net(dev), src_net) can fail, and your fix is
> not complete anyway.
That's true. The patch does not cover the following case:
ip link add foo type bar
ip link set foo netns netns1
In this case, the second command will call dev_change_net_namespace() and the
id will not be allocated.
I think Eric's patch is simpler and less error-prone.
FWIW, I will be off for one week and probably without any internet access ;-)
Regards,
Nicolas
next prev parent reply other threads:[~2015-02-27 16:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 6:32 [Patch net] netns: avoid allocating idr when dumping info Cong Wang
2015-02-27 8:01 ` Eric Dumazet
2015-02-27 16:25 ` Nicolas Dichtel [this message]
2015-02-27 16:55 ` Eric Dumazet
2015-02-27 17:07 ` [PATCH] net: do not use rcu in rtnl_dump_ifinfo() Eric Dumazet
2015-02-27 17:19 ` Daniel Borkmann
2015-02-27 17:40 ` Eric Dumazet
2015-02-27 18:35 ` Cong Wang
2015-02-27 17:42 ` [PATCH v2 net] " Eric Dumazet
2015-02-28 0:43 ` Jεan Sacren
2015-02-28 1:05 ` Eric Dumazet
2015-03-01 5:29 ` David Miller
2015-02-27 17:28 ` [Patch net] netns: avoid allocating idr when dumping info Cong Wang
2015-02-27 17:48 ` Nicolas Dichtel
2015-02-28 0:56 ` Cong Wang
2015-02-28 6:17 ` Cong Wang
2015-02-27 18:04 ` Eric Dumazet
2015-02-28 0:48 ` Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F09A95.8000507@6wind.com \
--to=nicolas.dichtel@6wind$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox