linux-next: build failure after merge of the sysctl tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

After merging the sysctl tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ipc/mq_sysctl.c:115:24: error: initialization of 'int (*)(struct ctl_table_header *, const struct ctl_table *)' from incompatible pointer type 'int (*)(struct ctl_table_header *, struct ctl_table *)' [-Werror=incompatible-pointer-types]
  115 |         .permissions = mq_permissions,
      |                        ^~~~~~~~~~~~~~
ipc/mq_sysctl.c:115:24: note: (near initialization for 'set_root.permissions')
ipc/mq_sysctl.c:116:26: error: initialization of 'void (*)(struct ctl_table_header *, const struct ctl_table *, kuid_t *, kgid_t *)' from incompatible pointer type 'void (*)(struct ctl_table_header *, struct ctl_table *, kuid_t *, kgid_t *)' [-Werror=incompatible-pointer-types]
  116 |         .set_ownership = mq_set_ownership,
      |                          ^~~~~~~~~~~~~~~~
ipc/mq_sysctl.c:116:26: note: (near initialization for 'set_root.set_ownership')

Caused by commits

  a6dd7f5a787b ("sysctl: treewide: constify ctl_table_root::permissions")
  a56545552ecf ("sysctl: treewide: constify ctl_table_root::set_ownership")

interacting with commit

  7608b6a72ed0 ("sysctl: Allow to change limits for posix messages queues")

from the userns tree.

I have applied the following merge resolution patch.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Wed, 6 Dec 2023 14:12:02 +1100
Subject: [PATCH] fixup for "sysctl: treewide: constify
 ctl_table_root::permissions"

and "sysctl: treewide: constify ctl_table_root::set_ownership" interacting
with "sysctl: Allow to change limits for posix messages queues".

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 ipc/mq_sysctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c
index 69c709262f5a..850dfc83af23 100644
--- a/ipc/mq_sysctl.c
+++ b/ipc/mq_sysctl.c
@@ -78,7 +78,7 @@ static int set_is_seen(struct ctl_table_set *set)
 }
 
 static void mq_set_ownership(struct ctl_table_header *head,
-			     struct ctl_table *table,
+			     const struct ctl_table *table,
 			     kuid_t *uid, kgid_t *gid)
 {
 	struct ipc_namespace *ns =
@@ -91,7 +91,7 @@ static void mq_set_ownership(struct ctl_table_header *head,
 	*gid = gid_valid(ns_root_gid) ? ns_root_gid : GLOBAL_ROOT_GID;
 }
 
-static int mq_permissions(struct ctl_table_header *head, struct ctl_table *table)
+static int mq_permissions(struct ctl_table_header *head, const struct ctl_table *table)
 {
 	int mode = table->mode;
 	kuid_t ns_root_uid;
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

Attachment: pgpS_xTaYGrDW.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux