]> git.baikalelectronics.ru Git - kernel.git/commit
[INET]: Fix truesize setting in ip_append_data
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Jan 2008 06:39:26 +0000 (22:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jan 2008 11:11:43 +0000 (03:11 -0800)
commit783bff17f1e7817c85ef74233a5a20ed43e0aeda
tree2dd386474d0ab5e728af671c2b2eafdacc099f09
parentaa6f47b2e085f16fcc240593a7847debf2f60ed8
[INET]: Fix truesize setting in ip_append_data

As it is ip_append_data only counts page fragments to the skb that
allocated it.  As such it means that the first skb gets hit with a
4K charge even though it might have only used a fraction of it while
all subsequent skb's that use the same page gets away with no charge
at all.

This bug was exposed by the UDP accounting patch.

[ The wmem_alloc bumping needs to be moved with the truesize,
  noticed by Takahiro Yasui.  -DaveM ]

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c
net/ipv6/ip6_output.c