From nobody Sun Dec 26 16:49:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9B3C21922DDA; Sun, 26 Dec 2021 16:49:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JMRbZ1Klsz4tqR; Sun, 26 Dec 2021 16:49:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0038D6106; Sun, 26 Dec 2021 16:49:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BQGnTUL014179; Sun, 26 Dec 2021 16:49:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BQGnTPo014178; Sun, 26 Dec 2021 16:49:29 GMT (envelope-from git) Date: Sun, 26 Dec 2021 16:49:29 GMT Message-Id: <202112261649.1BQGnTPo014178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 17ac6b1c1407 - main - bbr: drop packet synchronously in ctf_do_dropwithreset_conn() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17ac6b1c1407c7ca6a99c632416378a563b2c366 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640537370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ffzDO1wAaWyKTZIhYNR7AsbatmnsfLzKTIAxXn1GH80=; b=T2IF72bXj0hqEmMGA6WcGvDh5Vlhr07NnDJFIQ+3aqLtdLcOhnxe7lxfpF610l56GUu1s+ PHvI9Zx9sQgDKif9GRkD2DcnCIr4IQ2Q6h4WAOUPqx1vrCsll69UFmS2vKvURtVco2wkw8 3yBEkx5qY5dyyquCGHJaGFIZceni7ceLgeRPhTTtVDCuGiofvItDVVA7Dc5VknmR73o5ua nbakCyrizhxl7hPIJVw1mSB3vO/CU32Kp2A8/dp1bCE0qL/EZejFQRn+nwFXKWMlKuVYDa 0P+AQdH8OqP26Kp8bnlzgQ8KQPour1DnMnqzGht8E0czfolEhCIMR8JE6RRQ8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640537370; a=rsa-sha256; cv=none; b=xNRpv2PMSCZkYGAAYl05q+quwz1YLJd6aBiXjdSf46Cnlpj8Fdjv/DPJi3oXztzhnerOHy gU6hhs8IfT3Ogt8notMEiKqINhQjRTZJxY7ky4WqwzXBAg0F7bOWene2WIUwqaNMwYc86t gwhe53tx/Ki6lInGwkmXmjB3+t0C3P7rlpREX+EviQ1tnrveaiIy2rMuhVfRLwYf2AEXuI QbGX3ccIaJ3DQnXXcByMs5oCAOlCso1KQuhq3OJSeuRf3RkbhFSJmlWuhbH6KSbI4bcJWl Th5/Qg6K5D9Kl4Au6KimVygBWuWOZKpQMkQjKeVR1AiJHmLE219z7xXp4GVsHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=17ac6b1c1407c7ca6a99c632416378a563b2c366 commit 17ac6b1c1407c7ca6a99c632416378a563b2c366 Author: Gleb Smirnoff AuthorDate: 2021-12-26 16:48:06 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-26 16:48:06 +0000 bbr: drop packet synchronously in ctf_do_dropwithreset_conn() This function is always called from tcp_do_segment() method, that can drop tcpcb and return unlocked. Reviewed by: rrs, tuexen Differential revision: https://reviews.freebsd.org/D33367 --- sys/netinet/tcp_stacks/rack_bbr_common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index 42225dfced2f..1be426927073 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -969,11 +969,10 @@ ctf_do_dropwithreset_conn(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t rstreason, int32_t tlen) { - if (tp->t_inpcb) { - tcp_set_inp_to_drop(tp->t_inpcb, ETIMEDOUT); - } tcp_dropwithreset(m, th, tp, tlen, rstreason); - INP_WUNLOCK(tp->t_inpcb); + tp = tcp_drop(tp, ETIMEDOUT); + if (tp) + INP_WUNLOCK(tp->t_inpcb); } uint32_t