[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpVG1gHvzvL0X8zAuFzjNTJHzRVUzO_m6UEo6tGWNP7qjw@mail.gmail.com>
Date: Wed, 16 Nov 2016 10:04:03 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Andrei Vagin <avagin@...il.com>
Cc: Nicolas Dichtel <nicolas.dichtel@...nd.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: linux-next: net->netns_ids is used after calling idr_destroy for it
On Tue, Nov 15, 2016 at 2:45 PM, Andrei Vagin <avagin@...il.com> wrote:
> On Tue, Nov 15, 2016 at 2:21 PM, Andrei Vagin <avagin@...il.com> wrote:
>> I would like to agree with you here, but looks like sockets with
>> NETLINK_F_LISTEN_ALL_NSID are able to catch these messages.
>
> Actually I found that I was wrong.
>
> do_one_broadcast() sends a notification only if a device network
> namespace has an id in a socket netns. But cleanup_net() removes all
> id-s to a target namespace, so just ignore my last comment.
The point is all sockets in that netns are already gone at that point
because of refcount.
cleanup_net() also destroys net->netns_ids, so it should not be even
accessed after that point.
Powered by blists - more mailing lists