Thread (22 messages) 22 messages, 6 authors, 2016-11-17

Re: linux-next: net->netns_ids is used after calling idr_destroy for it

From: Cong Wang <hidden>
Date: 2016-11-15 18:51:12

On Tue, Nov 15, 2016 at 10:04 AM, Cong Wang [off-list ref] wrote:
On Mon, Nov 14, 2016 at 10:23 PM, Andrei Vagin [off-list ref] wrote:
quoted
Hi Nicolas,

cleanup_net() calls idr_destroy(net->netns_ids) for network namespaces
and then it calls unregister_netdevice_many() which calls
idr_alloc(net0>netns_ids). It looks wrong, doesn't it?
netns id is designed to allocate lazily, but yeah it makes no sense
to allocate id for the netns being destroyed, not to mention idr is freed.

I will send a patch.
Could you try the attached patch? I just did some quick netns creation/destroy
tests.

Thanks!

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help