From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Alexey Gladkov <legion@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: [PATCH] ipc/ipc_sysctl: Add missing include of linux/cred.h
Date: Fri, 30 Sep 2022 12:49:42 -0500 [thread overview]
Message-ID: <87mtagzr9l.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <202209301555.UK7B8MPo-lkp@intel.com> (kernel test robot's message of "Fri, 30 Sep 2022 15:49:21 +0800")
The kernel test robot recently reported[1][2] that in configurations
without CONFIG_COMPAT set the recent changes to ipc_permissions would
result in code that would not compile, as definitions present in
linux/cred.h were missing.
Include linux/cred.h explicitly in ipc/ipc_sysctl.c so that it builds
in all kernel configurations.
[1] https://lkml.kernel.org/r/202209301555.UK7B8MPo-lkp@intel.com
[2] https://lkml.kernel.org/r/202209301537.wYdDBROB-lkp@intel.com
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 54e1011bd95a ("sysctl: Allow change system v ipc sysctls inside ipc namespace")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
I have corrected the build error by adding the following patch
to the topic branch.
ipc/ipc_sysctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 31282e0a630d..29c1d3ae2a5c 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -14,6 +14,7 @@
#include <linux/ipc_namespace.h>
#include <linux/msg.h>
#include <linux/slab.h>
+#include <linux/cred.h>
#include "util.h"
static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write,
--
2.35.3
Eric
prev parent reply other threads:[~2022-09-30 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 7:49 [ebiederm-user-namespace:unpriv-ipc-sysctls-for-v6.1 1/3] ipc/ipc_sysctl.c:228:14: error: implicit declaration of function 'current_euid' is invalid in C99 kernel test robot
2022-09-30 17:49 ` Eric W. Biederman [this message]
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=87mtagzr9l.fsf@email.froward.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=kbuild-all@lists.01.org \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
/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