tcp: Fix tcp_mark_head_lost() with packets == 0
[linux-2.6.git] / net / ipv4 / tcp_input.c
index 788851c..c096a42 100644 (file)
@@ -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;