[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpVmmtR8EKc2AsP2wMq8K8m_SeRSwSw4tp5u=Rt4zdzi-g@mail.gmail.com>
Date: Wed, 3 May 2017 09:33:10 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: sock_create_kern() and (lack of) get_net()
On Wed, May 3, 2017 at 4:39 AM, David Laight <David.Laight@...lab.com> wrote:
> I suspect that many of the sockets created with 'kern=1' are not 'special'
> and should hold a reference to the namespace.
They are special if they are created in net init, which means they
have the same life-time with netns. They should NOT hold a refcnt,
otherwise who would release the last netns refcnt? net exit is called
when refcnt reaches 0, if you really held it, it is always at least 1.
Powered by blists - more mailing lists