[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250714182914.27c94a91@kernel.org>
Date: Mon, 14 Jul 2025 18:29:14 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Haiyang Zhang <haiyangz@...ux.microsoft.com>
Cc: linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
haiyangz@...rosoft.com, kys@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, edumazet@...gle.com, pabeni@...hat.com,
stephen@...workplumber.org, davem@...emloft.net,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH net] hv_netvsc: Switch VF namespace in netvsc_open
instead
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
Powered by blists - more mailing lists