mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Luis Chamberlain <mcgrof@kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Alexey Gladkov" <legion@kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux Next Mailing List" <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the sysctl tree
Date: Wed, 6 Dec 2023 14:19:41 +1100	[thread overview]
Message-ID: <20231206141941.3ed51cb1@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2661 bytes --]

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@canb.auug.org.au>
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@canb.auug.org.au>
---
 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-12-06  3:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06  3:19 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-30 22:49 Stephen Rothwell
2025-10-31 13:42 ` Joel Granados
2025-11-01 11:16   ` Stephen Rothwell
2025-11-02  8:10 ` Joel Granados
2022-03-30  0:56 Stephen Rothwell
2022-03-30 19:00 ` Luis Chamberlain
2022-04-04  0:26 ` Stephen Rothwell
2022-04-04  1:46   ` Luis Chamberlain
2022-04-04  3:39     ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231206141941.3ed51cb1@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=ebiederm@xmission.com \
    --cc=legion@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®