linux/drivers/net/hyperv
Haiyang Zhang 4faa6e3e66 hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event
commit 4c262801ea upstream.

The existing code moves VF to the same namespace as the synthetic NIC
during netvsc_register_vf(). But, if the synthetic device is moved to a
new namespace after the VF registration, the VF won't be moved together.

To make the behavior more consistent, add a namespace check for synthetic
NIC's NETDEV_REGISTER event (generated during its move), and move the VF
if it is not in the same namespace.

Cc: stable@vger.kernel.org
Fixes: c0a41b887c ("hv_netvsc: move VF to same namespace as netvsc device")
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1729275922-17595-1-git-send-email-haiyangz@microsoft.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-11-01 01:56:06 +01:00
..
hyperv_net.h hv_netvsc: Fix race between VF offering and VF association message from host 2022-10-07 08:43:58 +01:00
Kconfig hv_netvsc: rndis_filter needs to select NLS 2023-12-13 18:39:06 +01:00
Makefile hv_netvsc: Add XDP support 2020-01-25 10:43:19 +01:00
netvsc.c hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove 2024-02-23 09:12:42 +01:00
netvsc_bpf.c hv_netvsc: Add support for XDP_REDIRECT 2022-04-11 18:25:47 -07:00
netvsc_drv.c hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event 2024-11-01 01:56:06 +01:00
netvsc_trace.c hv_netvsc: add trace points 2018-03-17 20:10:27 -04:00
netvsc_trace.h hv_netvsc: add trace points 2018-03-17 20:10:27 -04:00
rndis_filter.c net: hv_netvsc: Fix a warning triggered by memcpy in rndis_filter 2022-10-15 11:09:53 +01:00