summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-10-29 15:20:21 +0300
committerChristian Brauner <brauner@kernel.org>2025-11-03 19:41:16 +0300
commit3dd50c58664e2684bd610a57bf3ab713cbb0ea91 (patch)
tree5441639655a80195e023b1325b00aabe8481dd4b
parent0b1765830cf9c652f010e9f5df7d9fa435a2f930 (diff)
downloadlinux-3dd50c58664e2684bd610a57bf3ab713cbb0ea91.tar.xz
ns: initialize ns_list_node for initial namespaces
Make sure that the list is always initialized for initial namespaces. Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-8-2e6f823ebdc0@kernel.org Fixes: 885fc8ac0a4d ("nstree: make iterator generic") Tested-by: syzbot@syzkaller.appspotmail.com Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--include/linux/ns_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h
index 3a72c3f81eca..71a5e28344d1 100644
--- a/include/linux/ns_common.h
+++ b/include/linux/ns_common.h
@@ -127,6 +127,7 @@ void __ns_common_free(struct ns_common *ns);
.ops = to_ns_operations(&nsname), \
.stashed = NULL, \
.__ns_ref = REFCOUNT_INIT(refs), \
+ .ns_list_node = LIST_HEAD_INIT(nsname.ns.ns_list_node), \
}
#define ns_common_init(__ns) \