Commit 22fff1d5 authored by Jian Shen's avatar Jian Shen Committed by Yang Yingliang
Browse files

net: hns3: add check for HNS3_NIC_STATE_INITED before net open



driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

----------------------------

In a small chance, a VF reset failed, and the VF device was not
initialized. In the time window before it retry, if another task
calls hns3_reset_notify_up_enet(), it will access uninitialized
ring memory, and calltrace. So add check for HNS3_NIC_STATE_INITED
before calling hns3_nic_net_open() in hns3_reset_notify_up_enet().

Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: default avatarli yongxin <liyongxin1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 4173565a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment