提交 b423e54b 编写于 作者: X Xiaomeng Tong 提交者: David S. Miller

myri10ge: fix an incorrect free for skb in myri10ge_sw_tso

All remaining skbs should be released when myri10ge_xmit fails to
transmit a packet. Fix it within another skb_list_walk_safe.
Signed-off-by: NXiaomeng Tong <xiam0nd.tong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 afb8e246
...@@ -2903,11 +2903,9 @@ static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb, ...@@ -2903,11 +2903,9 @@ static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb,
status = myri10ge_xmit(curr, dev); status = myri10ge_xmit(curr, dev);
if (status != 0) { if (status != 0) {
dev_kfree_skb_any(curr); dev_kfree_skb_any(curr);
if (segs != NULL) { skb_list_walk_safe(next, curr, next) {
curr = segs;
segs = next;
curr->next = NULL; curr->next = NULL;
dev_kfree_skb_any(segs); dev_kfree_skb_any(curr);
} }
goto drop; goto drop;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册