]> 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:45:10 +0000 (06:45 -0700)
commitcee70979bd4c7ec0832b2f4cdd15385e78a791d4
tree5a1b38fc59ef2e7a4fdd1c79ce39bd35ef8b84d6
parent6950a1e58100dd0e008db176dba716d867f87c6b
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