bpf: Remove unused field initialization in bpf's ctl_table
authorRicardo Ribalda <ribalda@chromium.org>
Wed, 21 Dec 2022 19:55:29 +0000 (20:55 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 22 Dec 2022 14:48:11 +0000 (15:48 +0100)
Maxlen is used by standard proc_handlers such as proc_dointvec(), but in this
case we have our own proc_handler via bpf_stats_handler(). Therefore, remove
the initialization.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20221221-bpf-syscall-v1-0-9550f5f2c3fc@chromium.org
kernel/bpf/syscall.c

index 35972af..8e55456 100644 (file)
@@ -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,
        },