tcp: fix tcp_trim_head()
authorEric Dumazet <eric.dumazet@gmail.com>
Sun, 4 Dec 2011 08:51:08 +0000 (08:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2011 23:30:03 +0000 (18:30 -0500)
commit4fa48bf3c75069d636fc8830743c929a062e80dc
tree3fe5e488ee6ac1af1b76497a5e6281106a8b2d2e
parent7d3113042823344dcc175b0ea00a83d0273c98a4
tcp: fix tcp_trim_head()

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>
net/ipv4/tcp_output.c