On Fri, Dec 8, 2017 at 9:27 PM, Tonghao Zhang <[email protected]> wrote:
> On Sat, Dec 9, 2017 at 6:09 AM, Cong Wang <[email protected]> wrote:
>> On Thu, Dec 7, 2017 at 9:28 PM, Tonghao Zhang <[email protected]> 
>> 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.

Reply via email to