[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpXJM5c_TJ7ax4Nvneb4v_WRgw1OwsU-ApNuXVibi9q7Bg@mail.gmail.com>
Date: Sat, 9 Dec 2017 11:42:10 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Tonghao Zhang <xiangxia.m.yue@...il.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH v5 2/2] sock: Move the socket inuse to namespace.
On Fri, Dec 8, 2017 at 9:27 PM, Tonghao Zhang <xiangxia.m.yue@...il.com> wrote:
> On Sat, Dec 9, 2017 at 6:09 AM, Cong Wang <xiyou.wangcong@...il.com> wrote:
>> On Thu, Dec 7, 2017 at 9:28 PM, Tonghao Zhang <xiangxia.m.yue@...il.com> wrote:
>>>
>>> Release the netlink sock created in kernel(not hold the _net_ namespace):
>>>
>>
>> You can avoid counting kernel sock by testing 'kern' in sk_alloc()
>> and testing 'sk->sk_net_refcnt' in __sk_free().
> Hi cong, if we do it in this way, we will not counter the sock created
> in kernel, right ?
Yes, it is not very useful for user-space to know how many kernel
sockets we create, IMHO, so not counting kernel sockets seems
fine.
Powered by blists - more mailing lists