Linux 6.10-rc3
[linux-2.6-block.git] / ipc / ipc_sysctl.c
index 3c3755918d3470c351a719a3e818dba1c4ab1994..9465b0ae470bad07ffce16193d05ee63bdb28686 100644 (file)
@@ -178,7 +178,6 @@ static struct ctl_table ipc_sysctls[] = {
                .extra2         = SYSCTL_INT_MAX,
        },
 #endif
-       {}
 };
 
 static struct ctl_table_set *set_lookup(struct ctl_table_root *root)
@@ -192,7 +191,6 @@ static int set_is_seen(struct ctl_table_set *set)
 }
 
 static void ipc_set_ownership(struct ctl_table_header *head,
-                             struct ctl_table *table,
                              kuid_t *uid, kgid_t *gid)
 {
        struct ipc_namespace *ns =
@@ -205,7 +203,7 @@ static void ipc_set_ownership(struct ctl_table_header *head,
        *gid = gid_valid(ns_root_gid) ? ns_root_gid : GLOBAL_ROOT_GID;
 }
 
-static int ipc_permissions(struct ctl_table_header *head, struct ctl_table *table)
+static int ipc_permissions(struct ctl_table_header *head, const struct ctl_table *table)
 {
        int mode = table->mode;
 
@@ -224,7 +222,7 @@ static int ipc_permissions(struct ctl_table_header *head, struct ctl_table *tabl
                kuid_t ns_root_uid;
                kgid_t ns_root_gid;
 
-               ipc_set_ownership(head, table, &ns_root_uid, &ns_root_gid);
+               ipc_set_ownership(head, &ns_root_uid, &ns_root_gid);
 
                if (uid_eq(current_euid(), ns_root_uid))
                        mode >>= 6;