From nobody Mon Sep 19 15:50:42 2022 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 4MWTfV54F9z4dDk5; Mon, 19 Sep 2022 15:50: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 4MWTfV25plz3XGD; Mon, 19 Sep 2022 15:50:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663602642; 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=mMb39IYs50fh1k/1q1SNgIxFE9dgyU3gN5cX/g3wOl4=; b=yoTV4HyCZiwwYE1FN2ii8p8ow038Xh2WProsiqlPIFUx4U7a62bdMLFA39AjX3S1ujzDEz rcU9HvgPneb5e6GuOr0gmVsirqW3obqM3XYSSvLixeyARf53Gve8fV8OZ0GtKIyR/eRpKx yH5vGfhxyF5SN9f470Re7EmkRs06DspnCH7c39bropTHAIzwjnaI488E/uZYhHiD92Q56X DTeLbli7U6ijJvCLHU0Fo4FU8kc+ttoDrHdwj0xtNrYRPUH64jxZBm3uLTdq/mDuzDV4eP TEIZT6wJigwfq7+HPDHM9Jcb3R9XhHeck1KYKc6f16ilK/jNfYl5Rg5W6tDxaA== 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 4MWTfV1BsPzQbn; Mon, 19 Sep 2022 15:50: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 28JFog7G059056; Mon, 19 Sep 2022 15:50:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28JFogLw059055; Mon, 19 Sep 2022 15:50:42 GMT (envelope-from git) Date: Mon, 19 Sep 2022 15:50:42 GMT Message-Id: <202209191550.28JFogLw059055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 0d0c1ffcf4fc - stable/13 - tcp: tcp6_connect() requires net epoch 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0d0c1ffcf4fc6d382887e89c5d8b0b7a270d0689 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663602642; 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=mMb39IYs50fh1k/1q1SNgIxFE9dgyU3gN5cX/g3wOl4=; b=MhZWLPu5eT6Co6DtnaHveRRIDOL8m57ovQBEuTVpVTJN841RB+M2lP/rbDJmss2l0sPubN z5GePlMqkSAczZd67qI/i8nbOO6Z1UxRucdNOd2NPLRl8qB+gsazaz+wamNX3euW1t8QP+ QiXukLIRthBpY9kEbdZvUk3WBUj6aYj+WwxI8yUBLj91lGu/1dABLFxDIH/p8N9OUZtCUh PvJ+pH3v4xgaDUwOi9EVdzNyQuM1/9AOYQLFDk9IC8UXBXuXk2yUhPNaWME7nPMSJOUA3v 9qv9pe98jULHXfSObV5WIma14rV3QQY4wAN0pdDwivvoyiBo1yic31J2xAaxAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663602642; a=rsa-sha256; cv=none; b=Lgn925rNlmCG0AzuYXeZSmaJ/urRRWrnxrWzCdaKH5GevGanq+0l4eNZ4Ppr/r65BS+pw9 c743eFZi///lQTmbnS1DiZm2YbcMhseqM/sG1V4550e7Hqee8e3o5hFIPYZMpPGqPhDw1e jnMFWqg+1ZfGdisO8KdMMA+R93z3udYQL5eYvADT2eZu0fkWftP9+HV/KF1ssgwXy2CfmM 37wjPWxbek78zA0hghtv4+z7RuHYo/VDSeKlceN/V4rvNGu6ZQEwuOIwU/ffbQM9LrwhWm 42Ej1cbC1qZImeGkpInz7r+AnXfu2Tgn1E7EeUs/F+VGRK+NojMLyCceLzlWiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0d0c1ffcf4fc6d382887e89c5d8b0b7a270d0689 commit 0d0c1ffcf4fc6d382887e89c5d8b0b7a270d0689 Author: Gleb Smirnoff AuthorDate: 2022-09-05 17:15:19 +0000 Commit: Gleb Smirnoff CommitDate: 2022-09-19 15:49:55 +0000 tcp: tcp6_connect() requires net epoch PR: 262663 Reported & tested by: dch (cherry picked from commit 0773b44e829421a806a89087009b294f16ee51fd) --- sys/netinet/tcp_usrreq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 4f40fe4d7730..74bf2925870f 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -700,20 +700,18 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; inp->inp_inc.inc_flags |= INC_ISIPV6; + NET_EPOCH_ENTER(et); if ((error = tcp6_connect(tp, nam, td)) != 0) - goto out; + goto out_in_epoch; #ifdef TCP_OFFLOAD if (registered_toedevs > 0 && (so->so_options & SO_NO_OFFLOAD) == 0 && (error = tcp_offload_connect(so, nam)) == 0) - goto out; + goto out_in_epoch; #endif tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); - NET_EPOCH_ENTER(et); error = tp->t_fb->tfb_tcp_output(tp); -#ifdef INET out_in_epoch: -#endif NET_EPOCH_EXIT(et); out: /*