diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-04-18 11:40:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-22 08:56:31 +0100 |
commit | bfa858f220ab8c950dd3e1310fee61950d0ecdae (patch) | |
tree | 2b500951abfbfd794f0371ddfa313f558a4d8561 /ipc | |
parent | 8442f8ba269f8f7321fba47c4fd1dc22402d8975 (diff) | |
download | linux-bfa858f220ab8c950dd3e1310fee61950d0ecdae.tar.gz linux-bfa858f220ab8c950dd3e1310fee61950d0ecdae.tar.bz2 linux-bfa858f220ab8c950dd3e1310fee61950d0ecdae.zip |
sysctl: treewide: constify ctl_table_header::ctl_table_arg
To be able to constify instances of struct ctl_tables it is necessary to
remove ways through which non-const versions are exposed from the
sysctl core.
One of these is the ctl_table_arg member of struct ctl_table_header.
Constify this reference as a prerequisite for the full constification of
struct ctl_table instances.
No functional change.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_sysctl.c | 2 | ||||
-rw-r--r-- | ipc/mq_sysctl.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 45cb1dabce29..3c3755918d34 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c @@ -306,7 +306,7 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns) void retire_ipc_sysctls(struct ipc_namespace *ns) { - struct ctl_table *tbl; + const struct ctl_table *tbl; tbl = ns->ipc_sysctls->ctl_table_arg; unregister_sysctl_table(ns->ipc_sysctls); diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c index 21fba3a6edaf..69c709262f5a 100644 --- a/ipc/mq_sysctl.c +++ b/ipc/mq_sysctl.c @@ -160,7 +160,7 @@ bool setup_mq_sysctls(struct ipc_namespace *ns) void retire_mq_sysctls(struct ipc_namespace *ns) { - struct ctl_table *tbl; + const struct ctl_table *tbl; tbl = ns->mq_sysctls->ctl_table_arg; unregister_sysctl_table(ns->mq_sysctls); |