]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add vlan list lock to protect vlan list
authorJian Shen <shenjian15@huawei.com>
Thu, 24 Mar 2022 12:54:49 +0000 (20:54 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Mar 2022 23:37:45 +0000 (16:37 -0700)
commit01a43f26c818ade85e8debd27edead2186bfe1b2
tree92ce8bd5cb7204cb646a3f6f5b3cc7d6ff20d201
parentec2b90cefaa37d64ee63f91a817cbff1571be0dc
net: hns3: add vlan list lock to protect vlan list

When adding port base VLAN, vf VLAN need to remove from HW and modify
the vlan state in vf VLAN list as false. If the periodicity task is
freeing the same node, it may cause "use after free" error.
This patch adds a vlan list lock to protect the vlan list.

Fixes: bbafec232ed3 ("net: hns3: Record VF vlan tables")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h