]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:41 +0000 (09:58 +0200)
commit9bbbf4c214f55d58e7fb331a89fba29b64e4fe23
tree2dec15d2dfa20eb0f8f0bc79db11a21fc6d83d4b
parent27db51ffbf40be084d8132afb26152e55753e3ab
net: hns3: add reset check for VF updating port based VLAN

[ Upstream commit a6f7bfdc78ddd8d719d108fef973b4e4a5a6ac6b ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c