]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add netdev reset check for hns3_set_tunable()
authorHao Chen <chenhao288@hisilicon.com>
Sat, 26 Mar 2022 09:51:03 +0000 (17:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Mar 2022 16:16:49 +0000 (09:16 -0700)
commitbf3c5ef149df0f89602f4e3556fac15149026bba
tree4550fefb87f6c49c36d65bae29db31758c20d254
parent79fab8d01d7cb9bce859f165aeacd4da8e23dd5b
net: hns3: add netdev reset check for hns3_set_tunable()

When pci device reset failed, it does uninit operation and priv->ring
is NULL, it causes accessing NULL pointer error.

Add netdev reset check for hns3_set_tunable() to fix it.

Fixes: 68b2b58c2c02 ("net: hns3: use bounce buffer when rx page can not be reused")
Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c