]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:38 +0000 (06:43 -0700)
commit9cc0b2b5877fd9292be2f74b7265fa36fabaf7a3
treeb557950a920bb85e1bc880621a699d7b88564666
parent8f52f33185ff13e76da8b1617ab0a82c495fcba8
net: hns3: check resetting status in hns3_get_stats()

[ Upstream commit c4e401e5a934bb0798ebbba98e08dab129695eff ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c