From patchwork Tue Sep 12 23:12:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinson Lee X-Patchwork-Id: 813114 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3xsLD93JvNz9t2W; Wed, 13 Sep 2017 09:12:25 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1druLt-0003p2-0C; Tue, 12 Sep 2017 23:12:21 +0000 Received: from gabe.freedesktop.org ([131.252.210.177]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1druLq-0003nK-Hk for kernel-team@lists.ubuntu.com; Tue, 12 Sep 2017 23:12:18 +0000 Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [IPv6:2610:10:20:722:a800:ff:feda:470f]) by gabe.freedesktop.org (Postfix) with ESMTP id 34D9E6E72A for ; Tue, 12 Sep 2017 23:12:17 +0000 (UTC) Received: by annarchy.freedesktop.org (Postfix, from userid 3222) id 32C99182A5; Tue, 12 Sep 2017 23:12:17 +0000 (UTC) From: Vinson Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Zesty][PATCH 4/5] tcp_bbr: remove sk_pacing_rate=0 transient during init Date: Tue, 12 Sep 2017 23:12:16 +0000 Message-Id: <1505257937-17925-4-git-send-email-vlee@freedesktop.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1505257937-17925-1-git-send-email-vlee@freedesktop.org> References: <1505257937-17925-1-git-send-email-vlee@freedesktop.org> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Neal Cardwell BugLink: https://bugs.launchpad.net/bugs/1708604 Fix a corner case noticed by Eric Dumazet, where BBR's setting sk->sk_pacing_rate to 0 during initialization could theoretically cause packets in the sending host to hang if there were packets "in flight" in the pacing infrastructure at the time the BBR congestion control state is initialized. This could occur if the pacing infrastructure happened to race with bbr_init() in a way such that the pacer read the 0 rather than the immediately following non-zero pacing rate. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Reported-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller (cherry picked from commit 1d3648eb5d1fe9ed3d095ed8fa19ad11ca4c8bc0) Signed-off-by: Vinson Lee --- net/ipv4/tcp_bbr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c index e69c8b44568a..20d834fd557d 100644 --- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c @@ -838,7 +838,6 @@ static void bbr_init(struct sock *sk) minmax_reset(&bbr->bw, bbr->rtt_cnt, 0); /* init max bw to 0 */ - sk->sk_pacing_rate = 0; /* force an update of sk_pacing_rate */ bbr_init_pacing_rate_from_rtt(sk); bbr->restore_cwnd = 0;