tcp: fix lost_cnt_hint miscounts
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Sat, 28 Feb 2009 04:44:28 +0000 (04:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2009 11:00:09 +0000 (03:00 -0800)
commit59a08cba6a604a265e45e9b970e372554cf46627
tree044bc6b23d3bd6a786dafb763363fa1da89afa65
parentac11ba753f3aa839292c1a3b6c971c637ad2e839
tcp: fix lost_cnt_hint miscounts

It is possible that lost_cnt_hint gets underflow in
tcp_clean_rtx_queue because the cumulative ACK can cover
the segment where lost_skb_hint points to only partially,
which means that the hint is not cleared, opposite to what
my (earlier) comment claimed.

Also I don't agree what I ended up writing about non-trivial
case there to be what I intented to say. It was not supposed
to happen that the hint won't get cleared and we underflow
in any scenario.

In general, this is quite hard to trigger in practice.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c