Re: [Patch net] netns: avoid allocating idr when dumping info
From: Eric Dumazet <hidden>
Date: 2015-02-27 08:01:11
From: Eric Dumazet <hidden>
Date: 2015-02-27 08:01:11
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.