From: Haiyang Zhang <haiyangz@linux.microsoft.com>
To: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org
Cc: haiyangz@microsoft.com, kys@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, andrew+netdev@lunn.ch, sd@queasysnail.net,
viro@zeniv.linux.org.uk, chuck.lever@oracle.com, neil@brown.name,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, davem@davemloft.net, kuniyu@google.com,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH net, 1/2] net: core: Fix missing init of llist_node in setup_net()
Date: Tue, 22 Jul 2025 16:50:47 -0700 [thread overview]
Message-ID: <1753228248-20865-2-git-send-email-haiyangz@linux.microsoft.com> (raw)
In-Reply-To: <1753228248-20865-1-git-send-email-haiyangz@linux.microsoft.com>
From: Haiyang Zhang <haiyangz@microsoft.com>
Add init_llist_node for lock-less list nodes in struct net in
setup_net(), so we can test if a node is on a list or not.
Cc: stable@vger.kernel.org
Fixes: d6b3358a2813 ("llist: add interface to check if a node is on a list.")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
net/core/net_namespace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index ae54f26709ca..2a821849558f 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -434,6 +434,9 @@ static __net_init int setup_net(struct net *net)
LIST_HEAD(net_exit_list);
int error = 0;
+ init_llist_node(&net->defer_free_list);
+ init_llist_node(&net->cleanup_list);
+
preempt_disable();
net->net_cookie = gen_cookie_next(&net_cookie);
preempt_enable();
--
2.34.1
next prev parent reply other threads:[~2025-07-22 23:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 23:50 [PATCH net, 0/2] net: Add llist_node init and fix hv_netvsc namespace error Haiyang Zhang
2025-07-22 23:50 ` Haiyang Zhang [this message]
2025-07-23 0:01 ` [PATCH net, 1/2] net: core: Fix missing init of llist_node in setup_net() Kuniyuki Iwashima
2025-07-23 0:17 ` [EXTERNAL] " Haiyang Zhang
2025-07-22 23:50 ` [PATCH net, 2/2] hv_netvsc: Fix panic during namespace deletion with VF Haiyang Zhang
2025-07-23 1:44 ` [PATCH net, 0/2] net: Add llist_node init and fix hv_netvsc namespace error Jakub Kicinski
2025-07-23 20:49 ` [EXTERNAL] " Haiyang Zhang
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=1753228248-20865-2-git-send-email-haiyangz@linux.microsoft.com \
--to=haiyangz@linux.microsoft.com \
--cc=andrew+netdev@lunn.ch \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil@brown.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wei.liu@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