From nobody Fri Dec 03 05:10:07 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 78CF418B8572; Fri, 3 Dec 2021 05:10:08 +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 4J519D1cb1z3kPL; Fri, 3 Dec 2021 05:10:08 +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 187522CA0; Fri, 3 Dec 2021 05:10:08 +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 1B35A8bF099610; Fri, 3 Dec 2021 05:10:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B35A7Fq099607; Fri, 3 Dec 2021 05:10:07 GMT (envelope-from git) Date: Fri, 3 Dec 2021 05:10:07 GMT Message-Id: <202112030510.1B35A7Fq099607@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: 12ae3476f35c - main - tcp_drain(): 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: 12ae3476f35c1f7c0e8cb55444728ed04c7130f9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638508208; 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=7fT+idu9Yh9mztXFFsBsb7YHrcQWZ21aaAJJGQ4nu2M=; b=SaCRVDssqOpvvtCLqQ5a9CUEhJyqUXd05mJYj1L10OjA4oDBHOJeqzRex+ayT0ti+CkRNI YqZUYKR0KyCaUUpZL4VXYBpUfoIBcoQ7q3XZq/y8C0dM5XFI9JtyzwftIynfrx0FCX5IDu PVCzNsk2bpoh+dPrFhxF7BgYqAVQvhGCf8MRFeC27J9IR7SVW+PhGQ28816YbDCx3l36ge 56JErmYr6h4kdF6S+e1NwuMF5ArYUo7M7qz4Svfx3yoDCRZI2c8oQvjl2h1Z72xA/Zq6lH THcbhA43d8cTh9WM/Pn/agXf3o5yea69hZXhLadIQb7SIC9sMYDg3i2XWbqj0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638508208; a=rsa-sha256; cv=none; b=UcyjwVwHrxaxrDnGPdch8SZW5Kwg5mQdDrPQCgAENi7+TOPCiAoFmwaFkN0i1MfbSjrCj1 kbs9ZjP4+zhsF8KdkuEkkzI6BII09lvYhP0enmy9n97FP/zerPE8BLKLQ4UQDUQrbaYexn wmHjUEv5KD8QW3MwQM4C46MwvCwDYLt0DM9CtV6NdAB5n9nc8uZSRYE7BpFne+PlXaHO63 TiRTpOtTopCfVADDH2C07y46lhOvyj0n8sLBoXtQKayft0o5wRxkwQzPA13Paqhi7sROcF ccQfIlNx3akxHrGE/l1w60jhgMQIK8TSKsBNccOm9/k8KB0adI585v2BXUP9PA== 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=12ae3476f35c1f7c0e8cb55444728ed04c7130f9 commit 12ae3476f35c1f7c0e8cb55444728ed04c7130f9 Author: Gleb Smirnoff AuthorDate: 2021-12-03 05:08:30 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-03 05:08:30 +0000 tcp_drain(): initialize the inpcb iterator when curvnet is set Reported by: cy 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 5b5df6821e6a..86417aad5836 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2613,8 +2613,6 @@ tcp_close(struct tcpcb *tp) void tcp_drain(void) { - struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo, - INPLOOKUP_WLOCKPCB); VNET_ITERATOR_DECL(vnet_iter); if (!do_tcpdrain) @@ -2623,6 +2621,8 @@ tcp_drain(void) VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); + struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo, + INPLOOKUP_WLOCKPCB); struct inpcb *inpb; struct tcpcb *tcpb;