From: Patrick McHardy Date: Tue, 1 Dec 2009 23:53:57 +0000 (-0800) Subject: ip_fragment: also adjust skb->truesize for packets not owned by a socket X-Git-Tag: v2.6.33-rc1~388^2~104^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2722b1c3a893ec6021508da15b32282ec79f4da;p=pandora-kernel.git ip_fragment: also adjust skb->truesize for packets not owned by a socket When a large packet gets reassembled by ip_defrag(), the head skb accounts for all the fragments in skb->truesize. If this packet is refragmented again, skb->truesize is not re-adjusted to reflect only the head size since its not owned by a socket. If the head fragment then gets recycled and reused for another received fragment, it might exceed the defragmentation limits due to its large truesize value. skb_recycle_check() explicitly checks for linear skbs, so any recycled skb should reflect its true size in skb->truesize. Change ip_fragment() to also adjust the truesize value of skbs not owned by a socket. Reported-and-tested-by: Ben Menchaca Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- Reading git-diff-tree failed