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: Xiaomeng Tong <xiam0nd.tong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
afb8e24652
commit
b423e54ba9
|
@ -2903,11 +2903,9 @@ static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb,
|
|||
status = myri10ge_xmit(curr, dev);
|
||||
if (status != 0) {
|
||||
dev_kfree_skb_any(curr);
|
||||
if (segs != NULL) {
|
||||
curr = segs;
|
||||
segs = next;
|
||||
skb_list_walk_safe(next, curr, next) {
|
||||
curr->next = NULL;
|
||||
dev_kfree_skb_any(segs);
|
||||
dev_kfree_skb_any(curr);
|
||||
}
|
||||
goto drop;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue