]> 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)
commit1fbb1bea6e0fab64493226aa2531602b2d4da35c
tree3b92a1d678d8c0966dcb977bd68e4b7be15b51c6
parent54950b2e0135cd50440d5f8c13e18876bd93b840
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: 24e686bbf38d ("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