inet: fix possible memory corruption with UDP_CORK and UFO
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / skbuff.h
index 9c676eae396867fbcc656bc9466fe19459f31b2f..eaf6027816353cfbe224bf0b1d30311b79dc762c 100644 (file)
@@ -627,6 +627,7 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb)
 }
 
 extern void kfree_skb(struct sk_buff *skb);
+extern void kfree_skb_list(struct sk_buff *segs);
 extern void skb_tx_error(struct sk_buff *skb);
 extern void consume_skb(struct sk_buff *skb);
 extern void           __kfree_skb(struct sk_buff *skb);
@@ -1307,6 +1308,11 @@ static inline int skb_pagelen(const struct sk_buff *skb)
        return len + skb_headlen(skb);
 }
 
+static inline bool skb_has_frags(const struct sk_buff *skb)
+{
+       return skb_shinfo(skb)->nr_frags;
+}
+
 /**
  * __skb_fill_page_desc - initialise a paged fragment in an skb
  * @skb: buffer containing fragment to be initialised