commit 68c331631143 ("v4 GRE: Add TCP segmentation offload for GRE") added a possible skb leak, because it frees only the head of segment list, in case a skb_linearize() call fails. This patch adds a kfree_skb_list() helper to fix the bug.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -627,6 +627,7 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb) · 626 unmodified lines | ||
| 627 | 627 | } |
| 628 | 628 | |
| 629 | 629 | extern void kfree_skb(struct sk_buff *skb); |
| 630 | +extern void kfree_skb_list(struct sk_buff *segs); | |
| 630 | 631 | extern void skb_tx_error(struct sk_buff *skb); |
| 631 | 632 | extern void consume_skb(struct sk_buff *skb); |
| 632 | 633 | extern void __kfree_skb(struct sk_buff *skb); |