Subject: Re: WARNING: at net/core/skbuff.c:154 with tcpdump and ipsec

From: Vlad Yasevich <[email-masked]>
Date: Fri, 13 Feb 2009 14:42:07 -0500

Jarek Poplawski wrote:
> On Fri, Feb 13, 2009 at 01:56:01PM -0500, Vlad Yasevich wrote:
> ...
>> I did notice that pskb_expand_head() doesn't change the skb->truesize even
>> though it could grow the skb.  I saw this problem with tcpdump while
>> experimenting with some SCTP code.
>>
>> This is not to say that it is the problem in this case, but it's one of
>> them that I've seen.
> 
> Yes, I've read Herbert Xu's message pointing especially to
> xfrm_state_check_space(). So I would like to make sure if there is no
> other reason it triggers in packet_recvmsg() on these several reports.
> 
> If af_packet code is OK, I guess we could update truesize for it:
> there is no reason to warn here about bugs from other, well known
> places.
> 

Personally, I think pskb_expand_head should fix the skb->truesize.  This
way any subsequent clones will not trigger this warning.

Another alternative is to audit the pskb_expand_head() usages and adjust
truesize in each case needed, which is just ugly.

-vlad

> Jarek P.