History

gre: fix a possible skb leak

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.

Eric Dumazet committed 13 years ago

Commit bd8a7031 parent 2b7a5db3 files · +14 −9Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/skbuff.h+1−0
@@ -627,6 +627,7 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb) · 626 unmodified lines
627}627}
628 628
629extern void kfree_skb(struct sk_buff *skb);629extern void kfree_skb(struct sk_buff *skb);
630extern void kfree_skb_list(struct sk_buff *segs);
630extern void skb_tx_error(struct sk_buff *skb);631extern void skb_tx_error(struct sk_buff *skb);
631extern void consume_skb(struct sk_buff *skb);632extern void consume_skb(struct sk_buff *skb);
632extern void __kfree_skb(struct sk_buff *skb);633extern void __kfree_skb(struct sk_buff *skb);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t