]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: check resetting status in hns3_get_stats()
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 4 Apr 2019 08:17:56 +0000 (16:17 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Apr 2019 17:20:39 +0000 (10:20 -0700)
commit7e6f18e3c099ff589e79d21661bd611d0352bab8
tree6c96e297ecdcd0b6ee54123c68125cceb3eac243
parent20d648d8c45ffed08a0b4f3a881af15fadc6c3fb
net: hns3: check resetting status in hns3_get_stats()

hns3_get_stats() should check the resetting status firstly,
since the device will be reinitialized when resetting. If the
reset has not completed, the hns3_get_stats() may access
invalid memory.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c