lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpX9i5J3j2g1QNY3f2+=Ech7bPKYOnR=31yj_Uw24FxY+A@mail.gmail.com>
Date:   Thu, 16 Nov 2017 12:20:56 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Tonghao Zhang <xiangxia.m.yue@...il.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Martin Zhang <zhangjunweimartin@...ichuxing.com>,
        Tonghao Zhang <zhangtonghao@...ichuxing.com>
Subject: Re: [PATCH v3 2/2] sock: Move the socket inuse to namespace.

On Wed, Nov 15, 2017 at 7:36 AM, Tonghao Zhang <xiangxia.m.yue@...il.com> 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);
>
> +#ifdef CONFIG_PROC_FS
> +static void sock_inuse_add(struct net *net, int val);
> +#endif
> +
>  /**
>   * sk_ns_capable - General socket capability test
>   * @sk: Socket to use a capability on or through
> @@ -1536,6 +1540,7 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
>                 if (likely(sk->sk_net_refcnt))
>                         get_net(net);
>                 sock_net_set(sk, net);
> +               sock_inuse_add(net, 1);

You don't need to define a nop for sock_inuse_add() in
!CONFIG_PROC_FS case?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ