Thread (6 messages) 6 messages, 5 authors, 2025-07-22

Re: [PATCH net] net: core: Fix the loop in default_device_exit_net()

From: Eric Dumazet <edumazet@google.com>
Date: 2025-07-22 06:52:04
Also in: linux-hyperv, lkml, stable

On Fri, Jul 18, 2025 at 1:21 PM Haiyang Zhang
[off-list ref] wrote:
From: Haiyang Zhang <haiyangz@microsoft.com>

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.

Cc: stable@vger.kernel.org # 5.4+
We (network maintainers) prefer a Fixes: tag, so that we can look at
the blamed patch, rather than trusting your '5.4' hint.

Without a Fixes tag, you are forcing each reviewer to do the
archeology work, and possibly completely miss your point.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help