--- /dev/null
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ABI: add back skb_truesize_bug() and skb_truesize_check()
+
+These functions were removed in 2.6.27.20 as they are broken and don't
+really work properly.
+
+But, some foolish external modules might actually be using them, so be
+safe and put them back in, but do not put back in the internal network
+checks that called them, as that's not needed.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/skbuff.h | 9 +++++++++
+ net/core/skbuff.c | 8 ++++++++
+ 2 files changed, 17 insertions(+)
+
+--- a/include/linux/skbuff.h
++++ b/include/linux/skbuff.h
+@@ -395,6 +395,15 @@ extern void skb_over_panic(struct
+ void *here);
+ extern void skb_under_panic(struct sk_buff *skb, int len,
+ void *here);
++extern void skb_truesize_bug(struct sk_buff *skb);
++
++static inline void skb_truesize_check(struct sk_buff *skb)
++{
++ int len = sizeof(struct sk_buff) + skb->len;
++
++ if (unlikely((int)skb->truesize < len))
++ skb_truesize_bug(skb);
++}
+
+ extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
+ int getfrag(void *from, char *to, int offset,
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -143,6 +143,14 @@ void skb_under_panic(struct sk_buff *skb
+ BUG();
+ }
+
++void skb_truesize_bug(struct sk_buff *skb)
++{
++ printk(KERN_ERR "SKB BUG: Invalid truesize (%u) "
++ "len=%u, sizeof(sk_buff)=%Zd\n",
++ skb->truesize, skb->len, sizeof(struct sk_buff));
++}
++EXPORT_SYMBOL(skb_truesize_bug);
++
+ /* Allocate a new skbuff. We do this ourselves so we can fill in a few
+ * 'private' fields and also do memory statistics to find all the
+ * [BEEP] leaks.