]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: free the pending skb when clean RX ring
authorPeng Li <lipeng321@huawei.com>
Sun, 14 Apr 2019 01:47:45 +0000 (09:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:34 +0000 (06:43 -0700)
commit8b4ad8fbfb95ad3167a13d26bdfa6cdd2211f4f6
treeab537141406c3fda11c242a8393ddac59e4b0e9c
parent71fb483c4bb876ce36a3b40614c3c14004238ecb
net: hns3: free the pending skb when clean RX ring

[ Upstream commit cc5ff6e90f808f9a4c8229bf2f1de0dfe5d7931c ]

If there is pending skb in RX flow when close the port, and the
pending buffer is not cleaned, the new packet will be added to
the pending skb when the port opens again, and the first new
packet has error data.

This patch cleans the pending skb when clean RX ring.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@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_enet.c