projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8be7362
)
net: hns3: clear param in ring when free ring
author
Peng Li
<lipeng321@huawei.com>
Tue, 22 Jan 2019 23:39:33 +0000
(07:39 +0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 23 Jan 2019 19:13:01 +0000
(11:13 -0800)
Param pending_buf and skb may be not NULL when free ring.
This patch clears them when free 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>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index
544f0d2
..
327dde2
100644
(file)
--- a/
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@
-3397,6
+3397,11
@@
static void hns3_fini_ring(struct hns3_enet_ring *ring)
ring->desc_cb = NULL;
ring->next_to_clean = 0;
ring->next_to_use = 0;
+ ring->pending_buf = 0;
+ if (ring->skb) {
+ dev_kfree_skb_any(ring->skb);
+ ring->skb = NULL;
+ }
}
static int hns3_buf_size2type(u32 buf_size)