[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250718163723.4390bd7d@kernel.org>
Date: Fri, 18 Jul 2025 16:37:23 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Haiyang Zhang <haiyangz@...ux.microsoft.com>, kuniyu@...gle.com
Cc: linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
haiyangz@...rosoft.com, kys@...rosoft.com, wei.liu@...nel.org,
edumazet@...gle.com, pabeni@...hat.com, horms@...nel.org,
davem@...emloft.net, sdf@...ichev.me, ahmed.zaki@...el.com,
aleksander.lobakin@...el.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: core: Fix the loop in
default_device_exit_net()
On Fri, 18 Jul 2025 13:20:14 -0700 Haiyang Zhang wrote:
> The loop in default_device_exit_net() won't be able to properly detect the
> head then stop, and will hit NULL pointer, when a driver, like hv_netvsc,
> automatically moves the slave device together with the master device.
>
> To fix this, add a helper function to return the first migratable netdev
> correctly, no matter one or two devices were removed from this net's list
> in the last iteration.
FTR I think that what the driver is trying to do is way too hacky, and
it should be fixed instead. But I defer to Kuniyuki for the final word,
maybe this change is useful for other reasons..
Powered by blists - more mailing lists