From: Ricardo Ribalda <ribalda@chromium.org>
To: John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Daniel Borkmann <daniel@iogearbox.net>,
Hao Luo <haoluo@google.com>, Yonghong Song <yhs@fb.com>,
Andrii Nakryiko <andrii@kernel.org>,
Alexei Starovoitov <ast@kernel.org>, Song Liu <song@kernel.org>,
Stanislav Fomichev <sdf@google.com>
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
Ricardo Ribalda <ribalda@chromium.org>
Subject: [PATCH] bpf: Remove unused field initialization
Date: Wed, 21 Dec 2022 20:55:29 +0100 [thread overview]
Message-ID: <20221221-bpf-syscall-v1-0-9550f5f2c3fc@chromium.org> (raw)
Maxlen is used by standard proc_handlers such as proc_dointvec(), but in this
case we have our own proc_handler. Remove the initialization.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
bpf: Trivial remove of unitialised field.
I have inspired myself in your code and heritaded this bug :). Fixing this
here so none else makes the same mistake.
To: Alexei Starovoitov <ast@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
To: John Fastabend <john.fastabend@gmail.com>
To: Andrii Nakryiko <andrii@kernel.org>
To: Martin KaFai Lau <martin.lau@linux.dev>
To: Song Liu <song@kernel.org>
To: Yonghong Song <yhs@fb.com>
To: KP Singh <kpsingh@kernel.org>
To: Stanislav Fomichev <sdf@google.com>
To: Hao Luo <haoluo@google.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
kernel/bpf/syscall.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 35972afb6850..8e55456bd648 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -5319,7 +5319,6 @@ static struct ctl_table bpf_syscall_table[] = {
{
.procname = "bpf_stats_enabled",
.data = &bpf_stats_enabled_key.key,
- .maxlen = sizeof(bpf_stats_enabled_key),
.mode = 0644,
.proc_handler = bpf_stats_handler,
},
---
base-commit: b6bb9676f2165d518b35ba3bea5f1fcfc0d969bf
change-id: 20221221-bpf-syscall-58d1ac3f817a
Best regards,
--
Ricardo Ribalda <ribalda@chromium.org>
next reply other threads:[~2022-12-21 19:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 19:55 Ricardo Ribalda [this message]
2022-12-21 20:10 ` Stanislav Fomichev
2022-12-21 20:13 ` Ricardo Ribalda
2022-12-21 20:18 ` Stanislav Fomichev
2022-12-22 15:00 ` patchwork-bot+netdevbpf
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=20221221-bpf-syscall-v1-0-9550f5f2c3fc@chromium.org \
--to=ribalda@chromium.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.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
all inboxes | Powered by JetHome®