There are some fixes about reset issue and a use-after-free
of self-test.
Huazhong Tan (3):
net: hns3: check reset pending after FLR prepare
net: hns3: fix for mishandle of asserting VF reset fail
net: hns3: add a missing uninit debugfs when unload driver
Yonglong Liu (1):
net: hns3: fix use-after-free when doing self test
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 +--
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 9 ++++++---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 5 +++++
4 files changed, 13 insertions(+), 6 deletions(-)
--
2.7.4
If there is a PF reset pending before FLR prepare, FLR's
preparatory work will not fail, but the FLR rebuild procedure
will fail for this pending. So this PF reset pending should
be handled in the FLR preparatory.
Fixes: 8627bdedc435 ("net: hns3: refactor the precedure of PF FLR")
Signed-off-by: Huazhong Tan <[email protected]>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 96bfad5..d6bfdc6 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -9859,7 +9859,7 @@ static void hclge_flr_prepare(struct hnae3_ae_dev *ae_dev)
set_bit(HCLGE_STATE_RST_HANDLING, &hdev->state);
hdev->reset_type = HNAE3_FLR_RESET;
ret = hclge_reset_prepare(hdev);
- if (ret) {
+ if (ret || hdev->reset_pending) {
dev_err(&hdev->pdev->dev, "fail to prepare FLR, ret=%d\n",
ret);
if (hdev->reset_pending ||
--
2.7.4
From: Huazhong Tan <[email protected]>
Date: Mon, 6 Jul 2020 19:25:58 +0800
> There are some fixes about reset issue and a use-after-free
> of self-test.
Series applied, thank you.