From nobody Tue Feb 22 22:50:06 2022 X-Original-To: dev-commits-src-branches@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 4393F19E61E4; Tue, 22 Feb 2022 22:50:07 +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 4K3Drt3KT6z3PkC; Tue, 22 Feb 2022 22:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645570207; 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=u4PESxH2ohdb1YqcrWcqrK3vNdZl+RWLKjv7hEZMzeA=; b=AOKZwJQPay/uwFftpzg0ykrCSkFxZge3dAYJiJ0slDFxasAWll/D0Q5c3Vju0IXTPsoUT0 a5OSl4Pu4W0xKaYlUi++VOEjO8ETfW7gMBuQc/bzFHpxZ/mPpGv9GHrepCovpMzHQzATW7 m/V2l7oDNvbyGP0MD+eaCBWSTg6FxwVOIKSPnDun6U3svZGrlodwomiuHnsxcFMXXalspI pv8355Fs4LQB+Y00aF4hBNobu/ZFl2xuI1NHdduda8knQyI81YUMVZdNhg2R4+6qTb068M lacd7ycl4LQI3PsP6aoMrybr+R73Lnr6Xi4ANvRbGT5dHiXhgDcSdE5yTtLGzA== 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 3C1ED4F88; Tue, 22 Feb 2022 22:50:06 +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 21MMo67C058857; Tue, 22 Feb 2022 22:50:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21MMo6uA058854; Tue, 22 Feb 2022 22:50:06 GMT (envelope-from git) Date: Tue, 22 Feb 2022 22:50:06 GMT Message-Id: <202202222250.21MMo6uA058854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 91ef9a745e10 - stable/13 - sctp: avoid LOR List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 91ef9a745e1043d5d932cd2de8876f338daa362a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645570207; 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=u4PESxH2ohdb1YqcrWcqrK3vNdZl+RWLKjv7hEZMzeA=; b=u0XkTKCbo6zSWyiMhWjrZjXg2HntuXNwjnJQWv7bDeY+kBNzZ4Jg7GyBiKB91fO8nJpDdk epSNoIfAIPuNGjPx5OC+P9SdhvTSgj8gg1dl5HrFdoonQhj5eHkkrIwHiAM96vy5kWBphd 2gB6QC3a9MEnVy1ZQSgKMFR6kwPXPPz10qfrw0WaYbFELlMjABZurD/BiA1Ka6CObAphUM xbrpNxJm2a6oELqitZ2WjSEBmKu1tWoWLS6G3qj9h3mH2svoxLW6QfXH5mRMdJDrBpRJKl 1SCcrBNSp++mRDic57bg3ieQ3Fgtzp6ZFZqj3GWljgQDC3tKYF0ZhbiLeI4LNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645570207; a=rsa-sha256; cv=none; b=u8B9xTT2AHZkvMN8J4EivjJzP1c9lQfaBB94Q+4Qj4/3WGd2v42p4Y2farNPYKABkXpukt mazQzvNosbUMy24sBwZHPUtoaP8k6YNbe5yjX+/VFQdMMEUUxWFLrDRRJ+7IfsUYcvBc+4 +0a2xTlrc/dAIEz+eg8UIHILg/VsV50QTzldeujAe8cPMvaBVtBE8nrnipEc2OhBZrtgu0 5cUyRbVVU0/rlDCwTV1nFAPvoZ8Ruwl1P6gMEASX8Sc+1kXJWPDg276l2nkGzTRN663RnM zC5QcfxKWhBti/RzzAeYYv3ZLBbA7GfW42JYLT0WKwcatspHkBGik9Yo2gpuDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=91ef9a745e1043d5d932cd2de8876f338daa362a commit 91ef9a745e1043d5d932cd2de8876f338daa362a Author: Michael Tuexen AuthorDate: 2021-09-12 19:11:14 +0000 Commit: Michael Tuexen CommitDate: 2022-02-22 22:49:39 +0000 sctp: avoid LOR Don't lock the inp-info lock while holding an stcb lock. Differential Revision: https://reviews.freebsd.org/D31921 (cherry picked from commit 29545986bdf6c949671e61fc46ee3f2440b1535b) --- sys/netinet/sctp_input.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 84d2a303303d..aeef68899b5f 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -679,9 +679,6 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb) if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { - SCTP_INP_INFO_RLOCK(); - new_vtag = sctp_select_a_tag(stcb->sctp_ep, stcb->sctp_ep->sctp_lport, stcb->rport, 1); - SCTP_INP_INFO_RLOCK(); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_INP_INFO_WLOCK(); @@ -690,6 +687,7 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb) } else { return (0); } + new_vtag = sctp_select_a_tag(stcb->sctp_ep, stcb->sctp_ep->sctp_lport, stcb->rport, 1); if (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) { /* generate a new vtag and send init */ LIST_REMOVE(stcb, sctp_asocs);