From: Christian Brauner Date: Wed, 29 Oct 2025 12:20:21 +0000 (+0100) Subject: ns: initialize ns_list_node for initial namespaces X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3dd50c58664e2684bd610a57bf3ab713cbb0ea91;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Christian Brauner --- diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h index 3a72c3f81eca4..71a5e28344d11 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) \