LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

[PATCH v3 06/11] ipv4/sysctl: constify ctl_table arguments of utility fu

To: Luis Chamberlain <mcgrof@xxxxxxxxxx>, Joel Granados <j.granados@xxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>
Subject: [PATCH v3 06/11] ipv4/sysctl: constify ctl_table arguments of utility functions
Cc: Eric Dumazet <edumazet@xxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, linux-hardening@xxxxxxxxxxxxxxx, bridge@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, rds-devel@xxxxxxxxxxxxxx, linux-sctp@xxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, apparmor@xxxxxxxxxxxxxxxx, Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
From: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
Date: Tue, 23 Apr 2024 09:54:41 +0200
In a future commit the proc_handlers themselves will change to
"const struct ctl_table". As a preparation for that adapt the internal
helpers.

Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
 net/ipv4/sysctl_net_ipv4.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index ce5d19978a26..fc4c001bf72a 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -130,7 +130,8 @@ static int ipv4_privileged_ports(struct ctl_table *table, 
int write,
        return ret;
 }
 
-static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t 
*low, kgid_t *high)
+static void inet_get_ping_group_range_table(const struct ctl_table *table,
+                                           kgid_t *low, kgid_t *high)
 {
        kgid_t *data = table->data;
        struct net *net =
@@ -145,7 +146,8 @@ static void inet_get_ping_group_range_table(struct 
ctl_table *table, kgid_t *low
 }
 
 /* Update system visible IP port range */
-static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t 
high)
+static void set_ping_group_range(const struct ctl_table *table,
+                                kgid_t low, kgid_t high)
 {
        kgid_t *data = table->data;
        struct net *net =

-- 
2.44.0



<Prev in Thread] Current Thread [Next in Thread>