]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net: hns3: add reset check for VF updating port based VLAN
authorJian Shen <shenjian15@huawei.com>
Tue, 28 Jul 2020 02:16:50 +0000 (10:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jul 2020 19:54:48 +0000 (12:54 -0700)
commita6f7bfdc78ddd8d719d108fef973b4e4a5a6ac6b
tree3b92a1d678d8c0966dcb977bd68e4b7be15b51c6
parenta7e90ee5965fafc53d36e8b3205f08c88d7bc11f
net: hns3: add reset check for VF updating port based VLAN

Currently hclgevf_update_port_base_vlan_info() may be called when
VF is resetting,  which may cause hns3_nic_net_open() being called
twice unexpectedly.

So fix it by adding a reset check for it, and extend critical
region for rntl_lock in hclgevf_update_port_base_vlan_info().

Fixes: 92f11ea177cd ("net: hns3: fix set port based VLAN issue for VF")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c