]> git.baikalelectronics.ru Git - 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)
commit5570b21c577ad900c7c4056332e00fb91bbe3bc6
tree3b92a1d678d8c0966dcb977bd68e4b7be15b51c6
parent7b5a159aecc0dde5dffee14a1f2475c55ab49b7b
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: a9f7d0434f47 ("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