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: <CAK8P3a0_AwRxTsYuK4p-vv61H34ERDp7od3C2c45u+0QyR+uhQ@mail.gmail.com>
Date:   Fri, 11 Dec 2020 21:59:51 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Yonatan Linik <yonatanlinik@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Andrii Nakryiko <andriin@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...omium.org>,
        Willem de Bruijn <willemb@...gle.com>,
        john.ogness@...utronix.de, Arnd Bergmann <arnd@...db.de>,
        Mao Wenan <maowenan@...wei.com>,
        Colin Ian King <colin.king@...onical.com>,
        orcohen@...oaltonetworks.com, Networking <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH 1/1] net: Fix use of proc_fs

On Fri, Dec 11, 2020 at 5:37 PM Yonatan Linik <yonatanlinik@...il.com> wrote:

> index 2b33e977a905..031f2b593720 100644
> --- a/net/packet/af_packet.c
> +++ b/net/packet/af_packet.c
> @@ -4612,9 +4612,11 @@ static int __net_init packet_net_init(struct net *net)
>         mutex_init(&net->packet.sklist_lock);
>         INIT_HLIST_HEAD(&net->packet.sklist);
>
> +#ifdef CONFIG_PROC_FS
>         if (!proc_create_net("packet", 0, net->proc_net, &packet_seq_ops,
>                         sizeof(struct seq_net_private)))
>                 return -ENOMEM;
> +#endif /* CONFIG_PROC_FS */
>

Another option would be to just ignore the return code here
and continue without a procfs file, regardless of whether procfs
is enabled or not.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ