From nobody Wed Feb 23 00:19:35 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 6279B19D6088; Wed, 23 Feb 2022 00:19:35 +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 4K3Gr72LG9z4b4W; Wed, 23 Feb 2022 00:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645575575; 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=YxaHFJLFw+6A8XQo7k6A1q1iR7aIxIUFUocOP94DHPU=; b=X3WyHjCEe2zrfGeiWywXcGa/nOitgg/S7uTnKSUaeZBkYNExM86m65FLhpZ6T9ce+j1XCl WPvJhdZe/geLsz+BslYe1zybJmzy8IJz5PpJAMqx8SY7bXcx+GhkxubmHK7JbUS2SIw3Zz Q9/619G3cP45IAn8qK4AEh+VTruiCxODORZoyeoqIgK8p9FCi0bl9ZAp5W/yy2wgpkMtZO rFktAEdU4ECrSJ39j5wH8r2CARUnjaB5jN0DnDwO3D9exF6F8Ma0w+R5SvNyGGMjfljUMl otjZX5n2sqW3AO1khdb3LXKwA2abWEQ3+nvE+XKfYbHdSYuo5JV0tXQ7CJc2Ow== 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 3201B626D; Wed, 23 Feb 2022 00:19:35 +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 21N0JZ6U080064; Wed, 23 Feb 2022 00:19:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21N0JZFU080063; Wed, 23 Feb 2022 00:19:35 GMT (envelope-from git) Date: Wed, 23 Feb 2022 00:19:35 GMT Message-Id: <202202230019.21N0JZFU080063@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: 73fd47690145 - stable/13 - sctp: don't hold the assoc create lock longer than needed 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 73fd476901453027cec9fd15e910c15e6b97a16a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645575575; 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=YxaHFJLFw+6A8XQo7k6A1q1iR7aIxIUFUocOP94DHPU=; b=WoykP17BlkdP4y8hYeUToksqOr7HxS6+2nrybvpprQj/jjghIVlmbJkVtx6NkU4gUUzRPd 9E9Dl8+5LF3iH6ddQixHxJT3NcJci21D5z7dgjb+mEiPAQEyyr0u5JS7KqEw6eS6g6WCcL G7bbOMHvYlH/sfsjAJ2M4wg04zqXZWx6ELtuevAOzZzZMhYpoYgxd/PDfnxeFjRn04kObw OXndt2uJC+TiXRlVZHsoM1P3SlK1p2bbe474+XHDpT4/PJatLUxa6HJiC43rX/nOFXOTkn ofwqb0ewl1aY9qzvuA7byRLmav65zu11F1LO4G069kts4Hg3zwJ8JyCeawBBdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645575575; a=rsa-sha256; cv=none; b=aUm73wJibGRz0nIxeeRAAo+lKDzHq2viJ4V1UepPU5QlyHACbEmfJNk2BI0FFCNqqen9RU TS7u6NFqZkdaS1IcLpesjdNIM7UDAs6SWOjcGLNzpBoUnVWxk7N3HKdo6d9QUqFHkqQlcf 2EH5Vxd4wTN1va3P5boWG8iYKDpnZWD1hIR3fF5GEu+6TabxeGN2EA4tn0q9Crk5JUXSkF Sydw+ASg04T/IDZVoKNz+0ymKOp2psgx9wuHWzb82qJ8FIsP/OxR2ByksDwun70+NCP/ND +j3oOAuaLVbEIJJGGJ3lUewcdPgV0iNTMb+e6QTnZkld/f9k5WOvUSGzedfehA== 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=73fd476901453027cec9fd15e910c15e6b97a16a commit 73fd476901453027cec9fd15e910c15e6b97a16a Author: Michael Tuexen AuthorDate: 2022-02-20 13:55:41 +0000 Commit: Michael Tuexen CommitDate: 2022-02-23 00:18:05 +0000 sctp: don't hold the assoc create lock longer than needed Reported by: syzbot+c738e3df67cf425c49a2@syzkaller.appspotmail.com (cherry picked from commit 2f0656fb9ba2b962be7f545763fd8c55640ded00) --- sys/netinet/sctp_output.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 3d81fb2b4288..86cf2ed75e90 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -12716,6 +12716,8 @@ sctp_lower_sosend(struct socket *so, } else { SCTP_TCB_LOCK_ASSERT(stcb); hold_tcblock = true; + SCTP_ASOC_CREATE_UNLOCK(inp); + create_lock_applied = false; } if (error) { goto out_unlocked;