From nobody Fri Dec 03 20:40:52 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 3BD8618ACC42; Fri, 3 Dec 2021 20:40:53 +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 4J5Pq86VNdz4nSQ; Fri, 3 Dec 2021 20:40:52 +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 BFF3B17834; Fri, 3 Dec 2021 20:40:52 +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 1B3Keqeu047924; Fri, 3 Dec 2021 20:40:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B3KeqG3047923; Fri, 3 Dec 2021 20:40:52 GMT (envelope-from git) Date: Fri, 3 Dec 2021 20:40:52 GMT Message-Id: <202112032040.1B3KeqG3047923@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: 36f42c5ebf69 - main - tcp_ccalgounload(): initialize the inpcb iterator when curvnet is set 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: 36f42c5ebf69bc4f135b00427f807a6cfce7f99c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638564052; 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=JeUy8IWLd2h9SJwcq7MOUG9pxKTtTHWTqjue3PnijRk=; b=fi7HRvWVe1JgSCwDimK78hPSrJpEZJdGjazxCr1Rj30psjBJK4TR1kzdw0necGkpFc2BWv Jmpzrn8p7BpQuL5jECnR6UqPQ/cfSOMMLodhFVd8DwL4mK++7yh0QWBnCHu4wAW7iCXlDA NWpXdqr+xpKyFly4Aq6ZaCd/FLVaWYGzIhG39Mvg/DTyNJ1V5F1/Ihvoa7KJtCD0k/M9rK lS5PftHprKgOdw2151RsSeFC6Gvh3KNu+k/kguvyCbsDK2FnnnmqbJmvgAZ8d/R9WmZoeR 9hKUIS8pRbAaAWIvl1HxgUdQux9PN136U4z0hEwF1jL9mSq1P/GtTQa11eJK1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638564052; a=rsa-sha256; cv=none; b=ROK1hN6fP4Fd9IHooSgIi3pG4xyJfF74sROQfQHXwoWUal9MgSgMITlfIA0MmsPImCBgJE 6sOa/SbhFi8E916rSY2tUv7HH+2VJln9FTDPT/VGHgjOxgV0gAufeuXSIA9Tk+jWR2AU7a k39IoAaHuZ5xnhwhWrmcfBPmZt7GsVt4+wxKpsh4SEy2I8i3z1bF8xGYLRJ/wW2mzbsD36 8tFfpTovunC1LK6y2Okn4uqTHR7tR1Zx3iH170EmTKJC7j9Opo5vzoQqIZQaGRWiOZuRFi 4MCvnBTyiVtPjRhymxrUUGiz1BSvPJPgUJTfWlIl2tRgh420QSs0oc6bsvul8Q== 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=36f42c5ebf69bc4f135b00427f807a6cfce7f99c commit 36f42c5ebf69bc4f135b00427f807a6cfce7f99c Author: Gleb Smirnoff AuthorDate: 2021-12-03 20:39:56 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-03 20:39:56 +0000 tcp_ccalgounload(): initialize the inpcb iterator when curvnet is set Pointy hat to: glebius Fixes: de2d47842e88 --- sys/netinet/tcp_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 86417aad5836..1ce8cddc30e1 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2303,8 +2303,6 @@ tcp_ccalgounload(struct cc_algo *unload_algo) struct inpcb *inp; struct tcpcb *tp; VNET_ITERATOR_DECL(vnet_iter); - struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo, - INPLOOKUP_WLOCKPCB); /* * Check all active control blocks across all network stacks and change @@ -2314,6 +2312,8 @@ tcp_ccalgounload(struct cc_algo *unload_algo) VNET_LIST_RLOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); + struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo, + INPLOOKUP_WLOCKPCB); /* * XXXGL: would new accept(2)d connections use algo being * unloaded?