diff options
| author | Eric Dumazet <[email protected]> | 2010-09-21 08:47:45 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2010-09-21 15:05:50 -0700 |
| commit | 3d13008e7345fa7a79d8f6438150dc15d6ba6e9d (patch) | |
| tree | a36caa5636e4030419ca8907642e75c0cd565143 /arch/powerpc/lib/code-patching.c | |
| parent | 7e96dc7045bff8758804b047c0dfb6868f182500 (diff) | |
ip: fix truesize mismatch in ip fragmentation
Special care should be taken when slow path is hit in ip_fragment() :
When walking through frags, we transfert truesize ownership from skb to
frags. Then if we hit a slow_path condition, we must undo this or risk
uncharging frags->truesize twice, and in the end, having negative socket
sk_wmem_alloc counter, or even freeing socket sooner than expected.
Many thanks to Nick Bowler, who provided a very clean bug report and
test program.
Thanks to Jarek for reviewing my first patch and providing a V2
While Nick bisection pointed to commit 2b85a34e911 (net: No more
expensive sock_hold()/sock_put() on each tx), underlying bug is older
(2.6.12-rc5)
A side effect is to extend work done in commit b2722b1c3a893e
(ip_fragment: also adjust skb->truesize for packets not owned by a
socket) to ipv6 as well.
Reported-and-bisected-by: Nick Bowler <[email protected]>
Tested-by: Nick Bowler <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
CC: Jarek Poplawski <[email protected]>
CC: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions