Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=34588b4c046c34773e5a1a962da7b78b05c4d1bd
Commit:     34588b4c046c34773e5a1a962da7b78b05c4d1bd
Parent:     6aaf47fa48d3c44280810b1b470261d340e4ed87
Author:     Ilpo Järvinen <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 30 00:57:33 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Apr 30 00:57:33 2007 -0700

    [TCP]: Catch skb with S+L bugs earlier
    
    SACKED_ACKED and LOST are mutually exclusive with SACK, thus
    having their sum larger than packets_out is bug with SACK.
    Eventually these bugs trigger traps in the tcp_clean_rtx_queue
    with SACK but it's much more informative to do this here.
    
    Non-SACK TCP, however, could get more than packets_out duplicate
    ACKs which each increment sacked_out, so it makes sense to do
    this kind of limitting for non-SACK TCP but not for SACK enabled
    one. Perhaps the author had the opposite in mind but did the
    logic accidently wrong way around? Anyway, the sacked_out
    incrementer code for non-SACK already deals this issue before
    calling sync_left_out so this trapping can be done
    unconditionally.
    
    Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/net/tcp.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index a385797..c6ecd45 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -736,9 +736,7 @@ static inline __u32 tcp_current_ssthresh(const struct sock 
*sk)
 
 static inline void tcp_sync_left_out(struct tcp_sock *tp)
 {
-       if (tp->rx_opt.sack_ok &&
-           (tp->sacked_out >= tp->packets_out - tp->lost_out))
-               tp->sacked_out = tp->packets_out - tp->lost_out;
+       BUG_ON(tp->sacked_out + tp->lost_out > tp->packets_out);
        tp->left_out = tp->sacked_out + tp->lost_out;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to