From: Ilpo Järvinen Date: Mon, 31 Dec 2007 12:43:32 +0000 (-0800) Subject: [TCP]: Make invariant check complain about invalid sacked_out X-Git-Tag: MMI-PSA29.97-13-9~37648^2~897 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ccd3130b3f681a4aef6392327256786b3b6aa04;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [TCP]: Make invariant check complain about invalid sacked_out Earlier resolution for NewReno's sacked_out should now keep it small enough for this to become invariant-like check. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 722c9cbb91e3..41f4b862319d 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2504,11 +2504,8 @@ tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag) (tcp_fackets_out(tp) > tp->reordering)); int fast_rexmit = 0; - /* Some technical things: - * 1. Reno does not count dupacks (sacked_out) automatically. */ - if (!tp->packets_out) + if (WARN_ON(!tp->packets_out && tp->sacked_out)) tp->sacked_out = 0; - if (WARN_ON(!tp->sacked_out && tp->fackets_out)) tp->fackets_out = 0;