From nobody Fri Apr 14 19:43:42 2023 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 4Pyn1p4NhFz44f3F; Fri, 14 Apr 2023 19:43:42 +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 4Pyn1p3gJNz3M0r; Fri, 14 Apr 2023 19:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681501422; 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=le26jD+qmXrAzZiJofhY7sHoHtuO2j8mu58V+Bb9DkY=; b=O334CZdZocTkRMemNr8onpdQuaIyvtkmx8gi0QiVIrh1e9zELy0Ktg2O/deqF9XAD+GFEY yb2jJVFaW5cP6gwQ23clg1Iy/2M0iQ9sLQoyDtrt4tczoxFTSoy0kzDrs3XQq7HfCOX5uv +/RaqIT6SoM7bjMgV/fQ1osfCFKx0i2VVKA72ZIcBJielnj7yipC51faAUpVbIaYaVDB9G wNHNUNep3z3xKJPNOpGUNp+vPVw/uBSpAQ6FG7D7MRGEEFI4yy28tIlIADaErHTD2QDsyh 1lV/GduKdTjGnbFDQYEmK0pc/DHdnF/0jhnpsuTl3KZ4vcLif8G4BaQJoVKP8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681501422; 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=le26jD+qmXrAzZiJofhY7sHoHtuO2j8mu58V+Bb9DkY=; b=glHNt5SP+AeRT/YIqyf4CsyG52Y8Vux2wbINXwBzmjw54AxPllMEa8JSXJkz2khQVzOJv3 erDqTsqPC/OXBOb16qh7jfVODeqgDRZh/JF0TWRNtApXSxlHRZLTAle6BywxBasbasPRQL hZ2nUIJtNAaZuFAGuWdhhTF3Jr/zYkiLKI3fLa8hUprtl+HjAhNSihYkdZ2oCe7CxpHsj3 VR9AAPJ8CR8X5keaUDfV4N/iC/z1R6hSagvrZLLSMJpkgC0IWvc2fB54KLsK/TgzPhRw/c DTV6Cm/97d3FNeeAfPW9Ao+CtCDBGJgSbwnmZN6EwPDTnZF1GrPLujVIoI+Q8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681501422; a=rsa-sha256; cv=none; b=nJxzNVHW/mQEkB+ioqJbp0arL/sn2sM9Vffb4jr7YEWAzo5uEMW0nPKnuEGKkSRuAeU9yi ld9XQxsvpsc1pHQh4CHpHiCLGtcEj8OE59E6egcNw6lOCYU2bQM0M4gf7zP/eQy1f9IPP1 1T7JFX60zcUkt/FG9o9Ss+iy/PUa09rE7IzsiugIaimL0gMSbeKtLTR/5pBIh33v4KYdm0 ty4kykfVU4U9KiNSDgGmYHz+AdpK9US+FaJf9yvIx+tVTctp4su7lmh2bpqeZ/hMf+q5bC Mcn/f6NhwxdeMKwqSd+dR7G4xfLOZpwiRQ/fdyCb61fRtVkGQVktPLiNghBOlA== 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 4Pyn1p2mtfzd6W; Fri, 14 Apr 2023 19:43:42 +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 33EJhgpj051467; Fri, 14 Apr 2023 19:43:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33EJhghd051466; Fri, 14 Apr 2023 19:43:42 GMT (envelope-from git) Date: Fri, 14 Apr 2023 19:43:42 GMT Message-Id: <202304141943.33EJhghd051466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 3cc7b6673280 - main - tcp: stack unloading crash in rack and bbr 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cc7b66732808a5f7f703f4b887fe6c60a3e7d4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc7b66732808a5f7f703f4b887fe6c60a3e7d4e commit 3cc7b66732808a5f7f703f4b887fe6c60a3e7d4e Author: Randall Stewart AuthorDate: 2023-04-14 19:42:23 +0000 Commit: Randall Stewart CommitDate: 2023-04-14 19:42:23 +0000 tcp: stack unloading crash in rack and bbr Its possible to induce a crash in either rack or bbr. This would be done if the rack stack were say the default and bbr was being used by a connection. If the bbr stack is then unloaded and it was active, we will trigger a MPASS assert in tcp_hpts since the new stack (default rack) would start a timer, and the old stack (bbr) would have the inp already in hpts. Reviewed by: tuexen Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39576 --- sys/netinet/tcp_stacks/bbr.c | 3 +++ sys/netinet/tcp_stacks/rack.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 623b65f2c159..bce17b57205c 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -9854,6 +9854,9 @@ bbr_stop_all_timers(struct tcpcb *tp, struct tcp_bbr *bbr) /* We enter in persists, set the flag appropriately */ bbr->rc_in_persist = 1; } + if (tcp_in_hpts(bbr->rc_inp)) { + tcp_hpts_remove(bbr->rc_inp); + } } static void diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index a6a15514ff53..7b97a8e9c5d9 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -8113,6 +8113,9 @@ rack_stop_all_timers(struct tcpcb *tp, struct tcp_rack *rack) /* We enter in persists, set the flag appropriately */ rack->rc_in_persist = 1; } + if (tcp_in_hpts(rack->rc_inp)) { + tcp_hpts_remove(rack->rc_inp); + } } static void