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]
Date:   Thu, 27 Feb 2020 11:50:24 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     Tobias Klauser <tklauser@...tanz.ch>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] unix: define and set show_fdinfo only if procfs is
 enabled

On 26.02.2020 20:29, Tobias Klauser wrote:
> Follow the pattern used with other *_show_fdinfo functions and only
> define unix_show_fdinfo and set it in proto_ops if CONFIG_PROCFS
> is set.
> 
> Fixes: 3c32da19a858 ("unix: Show number of pending scm files of receive queue in fdinfo")
> Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>

Reviewed-by: Kirill Tkhai <ktkhai@...tuozzo.com>

> ---
>  net/unix/af_unix.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 62c12cb5763e..aa6e2530e1ec 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -682,6 +682,7 @@ static int unix_set_peek_off(struct sock *sk, int val)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PROCFS
>  static void unix_show_fdinfo(struct seq_file *m, struct socket *sock)
>  {
>  	struct sock *sk = sock->sk;
> @@ -692,6 +693,9 @@ static void unix_show_fdinfo(struct seq_file *m, struct socket *sock)
>  		seq_printf(m, "scm_fds: %u\n", READ_ONCE(u->scm_stat.nr_fds));
>  	}
>  }
> +#else
> +#define unix_show_fdinfo NULL
> +#endif
>  
>  static const struct proto_ops unix_stream_ops = {
>  	.family =	PF_UNIX,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ