On Fri, Nov 17, 2017 at 4:20 AM, Cong Wang wrote:
> On Wed, Nov 15, 2017 at 7:36 AM, Tonghao Zhang
> wrote:
>> diff --git a/net/core/sock.c b/net/core/sock.c
>> index b899d8669388..f01ed0b41bde 100644
>> --- a/net/core/sock.c
>> +++ b/net/core/sock.c
>> @@ -145,6 +145,10 @@
>> static DEFINE_MUT
On Wed, Nov 15, 2017 at 7:36 AM, Tonghao Zhang wrote:
> diff --git a/net/core/sock.c b/net/core/sock.c
> index b899d8669388..f01ed0b41bde 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -145,6 +145,10 @@
> static DEFINE_MUTEX(proto_list_mutex);
> static LIST_HEAD(proto_list);
>
> +#i
From: Tonghao Zhang
This patch add a member in struct netns_core. and this is
a counter for socket_inuse in the _net_ namespace. The patch
will add/sub counter in the sk_alloc or sk_free. Because socket and
sock is in pair. It's a easy way to maintain the code. and help
developer to review. More