Skip to content
Commit 4c262801 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Paolo Abeni
Browse files

hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event



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: c0a41b88 ("hv_netvsc: move VF to same namespace as netvsc device")
Suggested-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1729275922-17595-1-git-send-email-haiyangz@microsoft.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent ee76eb24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment