summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-09-24 13:33:59 +0200
committerChristian Brauner <brauner@kernel.org>2025-09-25 09:23:54 +0200
commit4055526d35746ce8b04bfa5e14e14f28bb163186 (patch)
tree9d42503429528822e4cc7c2a38f2fd4bbcf10d4c /ipc
parent10cdfcd37ade7ce736bc4a1927680f390a6b1f7b (diff)
ns: move ns type into struct ns_common
It's misplaced in struct proc_ns_operations and ns->ops might be NULL if the namespace is compiled out but we still want to know the type of the namespace for the initial namespace struct. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/msgutil.c1
-rw-r--r--ipc/namespace.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/ipc/msgutil.c b/ipc/msgutil.c
index dca6c8ec8f5f..7a03f6d03de3 100644
--- a/ipc/msgutil.c
+++ b/ipc/msgutil.c
@@ -33,6 +33,7 @@ struct ipc_namespace init_ipc_ns = {
#ifdef CONFIG_IPC_NS
.ns.ops = &ipcns_operations,
#endif
+ .ns.ns_type = ns_common_type(&init_ipc_ns),
};
struct msg_msgseg {
diff --git a/ipc/namespace.c b/ipc/namespace.c
index d89dfd718d2b..76abac74a5c3 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -248,7 +248,6 @@ static struct user_namespace *ipcns_owner(struct ns_common *ns)
const struct proc_ns_operations ipcns_operations = {
.name = "ipc",
- .type = CLONE_NEWIPC,
.get = ipcns_get,
.put = ipcns_put,
.install = ipcns_install,