On Sat, 25 Sep 2004 09:20:53 +1000
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> In order for the skb trimming to work, we need to set truesize in
> pskb_expand_head. This patch does exactly that.
I tried to warn people about this earlier in the netlink
NLMSG_GOODSIZE thread.... ho hum.
This change mucks up socket buffer accounting.
If you change skb->truesize, then when the kfree_skb(skb)
happens a different skb->truesize will be subtracted from
the socket buffer allocation than what was used when the
skb was first charged to the socket.
Basically, once a skb might potentially be charged to a
socket, you cannot change truesize unless you are extremely
This is another reason why I recommended to use a scratch
buffer, btw :-)