From: Jakub Kicinski <kuba@kernel.org>
To: Haiyang Zhang <haiyangz@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org,
haiyangz@microsoft.com, kys@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, edumazet@google.com, pabeni@redhat.com,
stephen@networkplumber.org, davem@davemloft.net,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net] hv_netvsc: Switch VF namespace in netvsc_open instead
Date: Mon, 14 Jul 2025 18:29:14 -0700 [thread overview]
Message-ID: <20250714182914.27c94a91@kernel.org> (raw)
In-Reply-To: <1752267430-28487-1-git-send-email-haiyangz@linux.microsoft.com>
On Fri, 11 Jul 2025 13:57:10 -0700 Haiyang Zhang wrote:
> The existing code move the VF NIC to new namespace when NETDEV_REGISTER is
> received on netvsc NIC. During deletion of the namespace,
> default_device_exit_batch() >> default_device_exit_net() is called. When
> netvsc NIC is moved back and registered to the default namespace, it
> automatically brings VF NIC back to the default namespace. This will cause
> the default_device_exit_net() >> for_each_netdev_safe loop unable to detect
> the list end, and hit NULL ptr:
Are you saying that when netns is dismantled both devices are listed
for moving back to default, but the netvsc_event_set_vf_ns() logic
tries to undo the move / move the VF before the netns dismantle loop
got to it?
This needs a better fix, moving on open is way too hacky.
Perhaps we should start with reverting 4c262801ea60 and then trying
to implement it in a more robust way?
--
pw-bot: cr
next prev parent reply other threads:[~2025-07-15 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 20:57 [PATCH net] hv_netvsc: Switch VF namespace in netvsc_open instead Haiyang Zhang
2025-07-15 1:29 ` Jakub Kicinski [this message]
2025-07-15 15: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=20250714182914.27c94a91@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@linux.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=stephen@networkplumber.org \
--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;
as well as URLs for NNTP newsgroup(s).