]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hv_netvsc: Mark VF as slave before exposing it to user-mode
authorLong Li <longli@microsoft.com>
Sun, 19 Nov 2023 16:23:43 +0000 (08:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:31:24 +0000 (07:31 +0100)
commitd181a7a1d55db96b0279830987318c1489465f9d
tree908492c4e89e52eb7af4b0f581d7e74b87380352
parent97683466e24c801ee4e865ce90ac7e355db2da59
hv_netvsc: Mark VF as slave before exposing it to user-mode

commit c807d6cd089d2f4951baa838081ec5ae3e2360f8 upstream.

When a VF is being exposed form the kernel, it should be marked as "slave"
before exposing to the user-mode. The VF is not usable without netvsc
running as master. The user-mode should never see a VF without the "slave"
flag.

This commit moves the code of setting the slave flag to the time before
VF is exposed to user-mode.

Cc: stable@vger.kernel.org
Fixes: 0c195567a8f6 ("netvsc: transparent VF management")
Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc_drv.c