diff options
| author | Lennart Schulte <[email protected]> | 2010-03-17 02:16:29 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2010-03-20 05:47:22 +0000 |
| commit | 6830c25b7d08fbbd922959425193791bc42079f2 (patch) | |
| tree | 4a3175a62c62375a5b7a611914842ccc48328aa1 /net/ipv4/tcp_input.c | |
| parent | net: ipmr/ip6mr: fix potential out-of-bounds vif_table access (diff) | |
| download | kernel-6830c25b7d08fbbd922959425193791bc42079f2.tar.gz kernel-6830c25b7d08fbbd922959425193791bc42079f2.zip | |
tcp: Fix tcp_mark_head_lost() with packets == 0
A packet is marked as lost in case packets == 0, although nothing should be done.
This results in a too early retransmitted packet during recovery in some cases.
This small patch fixes this issue by returning immediately.
Signed-off-by: Lennart Schulte <[email protected]>
Signed-off-by: Arnd Hannemann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 788851ca8c5d..c096a4218b8f 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2511,6 +2511,9 @@ static void tcp_mark_head_lost(struct sock *sk, int packets) int err; unsigned int mss; + if (packets == 0) + return; + WARN_ON(packets > tp->packets_out); if (tp->lost_skb_hint) { skb = tp->lost_skb_hint; |
