diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-25 23:09:34 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-16 17:52:42 -0700 |
commit | 21ef40e66f6186898ea4240b83a0f1c7424953d0 (patch) | |
tree | f8cd7f28a308c33114c8988c0ce3638ec958158e /include/linux | |
parent | a6fa7047cf5cb20353178e9b31c3105f13461b54 (diff) |
net: Kill skb_truesize_check(), it only catches false-positives.
[ Upstream commit 92a0acce186cde8ead56c6915d9479773673ea1a ]
A long time ago we had bugs, primarily in TCP, where we would modify
skb->truesize (for TSO queue collapsing) in ways which would corrupt
the socket memory accounting.
skb_truesize_check() was added in order to try and catch this error
more systematically.
However this debugging check has morphed into a Frankenstein of sorts
and these days it does nothing other than catch false-positives.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/skbuff.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 909923717830..2dc6958f3af4 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -395,15 +395,6 @@ extern void skb_over_panic(struct sk_buff *skb, int len, 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, |