linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Yonatan Linik <yonatanlinik@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	Willem de Bruijn <willemb@google.com>,
	john.ogness@linutronix.de, Arnd Bergmann <arnd@arndb.de>,
	Mao Wenan <maowenan@huawei.com>,
	Colin Ian King <colin.king@canonical.com>,
	orcohen@paloaltonetworks.com, Networking <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH 1/1] net: Fix use of proc_fs
Date: Fri, 11 Dec 2020 21:59:51 +0100	[thread overview]
Message-ID: <CAK8P3a0_AwRxTsYuK4p-vv61H34ERDp7od3C2c45u+0QyR+uhQ@mail.gmail.com> (raw)
In-Reply-To: <20201211163749.31956-2-yonatanlinik@gmail.com>

On Fri, Dec 11, 2020 at 5:37 PM Yonatan Linik <yonatanlinik@gmail.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

  reply	other threads:[~2020-12-11 21:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 16:37 [PATCH 0/1] net: Fix use of proc_fs Yonatan Linik
2020-12-11 16:37 ` [PATCH 1/1] " Yonatan Linik
2020-12-11 20:59   ` Arnd Bergmann [this message]
2020-12-12  8:39     ` Yonatan Linik
2020-12-12 19:48   ` Jakub Kicinski
2020-12-12 21:39     ` Yonatan Linik
2020-12-12 21:51       ` Jakub Kicinski
2020-12-13  9:48         ` Yonatan Linik
2020-12-14 19:07           ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a0_AwRxTsYuK4p-vv61H34ERDp7od3C2c45u+0QyR+uhQ@mail.gmail.com \
    --to=arnd@kernel.org \
    --cc=andriin@fb.com \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=colin.king@canonical.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=john.ogness@linutronix.de \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=orcohen@paloaltonetworks.com \
    --cc=songliubraving@fb.com \
    --cc=willemb@google.com \
    --cc=yhs@fb.com \
    --cc=yonatanlinik@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).