tcp: fix tcp_trim_head()
authorEric Dumazet <eric.dumazet@gmail.com>
Sun, 4 Dec 2011 08:51:08 +0000 (08:51 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:22 +0000 (13:14 +0100)
commit91bb95f240936feb98f7d540027c78773e4b84cb
treea7effcaf9f318ad95a427afc74cb0088564e9d55
parent34b0788a13e9c65440e3d736a91f75964356ad67
tcp: fix tcp_trim_head()

[ Upstream commit 4fa48bf3c75069d636fc8830743c929a062e80dc ]

commit f07d960df3 (tcp: avoid frag allocation for small frames)
breaked assumption in tcp stack that skb is either linear (skb->data_len
== 0), or fully fragged (skb->data_len == skb->len)

tcp_trim_head() made this assumption, we must fix it.

Thanks to Vijay for providing a very detailed explanation.

Reported-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv4/tcp_output.c