public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: "edumazet@google.com" <edumazet@google.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [RFC] tcp: remove BUG_ON in tcp_shifted_skb
Date: Fri, 17 Jan 2020 02:03:45 +0000	[thread overview]
Message-ID: <5cfa925ff7394e10bbbf5132e44cbea4@baidu.com> (raw)

I think this BUG_ON in tcp_shifted_skb maybe be triggered if a GSO skb is 
sacked, but sack is faked, and not ack the whole mss length, only ack less
than mss length

Is it possible ?

- Li RongQing <lirongqing@baidu.com>

---
 net/ipv4/tcp_input.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 1d1e3493965f..141bc85092b5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1327,7 +1327,8 @@ static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev,
        TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS);
 
        if (skb->len > 0) {
-               BUG_ON(!tcp_skb_pcount(skb));
                NET_INC_STATS(sock_net(sk), LINUX_MIB_SACKSHIFTED);
                return false;
        }
-- 
2.16.2



             reply	other threads:[~2020-01-17  2:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17  2:03 Li,Rongqing [this message]
2020-01-17  2:59 ` [RFC] tcp: remove BUG_ON in tcp_shifted_skb Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5cfa925ff7394e10bbbf5132e44cbea4@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox