From nobody Tue Feb 22 22:56:06 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 99A4C19E9251; Tue, 22 Feb 2022 22:56:06 +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 4K3Dzp3y2Xz3lFT; Tue, 22 Feb 2022 22:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645570566; 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=PVurf41Dl0FHfr8mpJj1G8/UAyJfUZ/nix7I0LSeVdU=; b=dDYnvGIJhEaFv57PudGIzZhbAEbv5xcnxpHPfGjZ8gPnUqDdjWe0ptTKUjE0+cH8ivple9 pdOV+A2TZBL91hvU8qi+oEqbhxyjRwXB/RC9/yc/8/VLq6i57Q+Di97/3ioJt6kjp2pdmt FeJPfzhM2agyFWqzac6pbsp4ns2hNdIcl94eOmERE6kZUA49JXrToT6TPqmcmLgqhQzo/G raS5L7NV6L9RFt6gbvg3AqRmXdU6ekwtYvyhGVqdJuQ+ifjB/Sls79KCJdTST8CeJVZvAj 1RhVbcif5wwUak9UhyzvMdUeUJpTHXL8gdvUN9cjzaUxaWDS3bIqBbA1hMXhCA== 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 67E394F79; Tue, 22 Feb 2022 22:56: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 21MMu6fX069889; Tue, 22 Feb 2022 22:56:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21MMu6J0069888; Tue, 22 Feb 2022 22:56:06 GMT (envelope-from git) Date: Tue, 22 Feb 2022 22:56:06 GMT Message-Id: <202202222256.21MMu6J0069888@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: d7351c4104a3 - stable/13 - sctp: avoid locking an already locked mutex 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: d7351c4104a3dbd793f2ae7303cfdd948fc229ff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645570566; 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=PVurf41Dl0FHfr8mpJj1G8/UAyJfUZ/nix7I0LSeVdU=; b=yi4Gp0ax7WYwH3/PRIreNlJL6kTcCA04eBDmYL1i9UGLWik8lpa6YqeKXYiaFt4xIXn5AE g90ciiuInn4/rSEbLiqbyjVd9fUY1yec2dVSu3bcojoIcX1PWphj9PMCbRoe5fzka7ulap 1Qni7TAqmOoeCgHrpD9NwsiV7CiY8f6HVxkfZXIz/TAYKVvjLsjQvv9CJAUm0lw4tg4614 Ourw35gOx901ZCGCNPZWQd12ct0ruc9coAotenJ30UM4+JhLCKsOas2IanUDRah4g+PyDw BvkxSxhxccYPKTs8n8tNshg/gQ1nSLkXkeh/3EsN7wvJSv7yfX0MH2VwzfmpFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645570566; a=rsa-sha256; cv=none; b=VwH5jJsHy0l3aeQT1BNGAFissuvjJK0CRNyNsuBqIQ+8NspJyqAUvE63OD8kkNjI/Wx5CT kLv++VQhalv3P2m3RLxeJpbld02Oc7IlSYG06WrvmkWXoopw5XVHbkk2T9JuH3HQ++hEug 7c/Ucs13WryfWsYMy53XBKG+wbDqVL39UJiEsB0pFYL2zLql7DR+gIqrsr9ApseErSDkI7 i7o5TM+7Az8B3UcInBP8DRMBQjJa1YmTucr9C+VrEINouRJ1essQxc/PHzmMKJ6ws0sNJh NDmPkM2ydh8R6TVNLecWkCoRm8GGEc2SowFmXJTK5KvGxk0BxfGGTVfRzZp2+A== 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=d7351c4104a3dbd793f2ae7303cfdd948fc229ff commit d7351c4104a3dbd793f2ae7303cfdd948fc229ff Author: Michael Tuexen AuthorDate: 2021-09-28 03:14:56 +0000 Commit: Michael Tuexen CommitDate: 2022-02-22 22:55:45 +0000 sctp: avoid locking an already locked mutex Reported by: syzbot+f048680690f2e8d7ddad@syzkaller.appspotmail.com Reported by: syzbot+0725c712ba89d123c2e9@syzkaller.appspotmail.com (cherry picked from commit 171633765c4367dc233a4bf0e5926cb7c4decfc1) --- sys/netinet/sctp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index c994b90b8353..17d834cd2734 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -1387,6 +1387,7 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, struct sctp_tcb *stcb) SCTP_PRINTF("Hmm, stream queue cnt at %d I counted %d in stream out wheel\n", stcb->asoc.stream_queue_cnt, chks_in_queue); } + SCTP_TCB_SEND_UNLOCK(stcb); if (chks_in_queue) { /* call the output queue function */ sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); @@ -1406,7 +1407,6 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, struct sctp_tcb *stcb) (u_long)stcb->asoc.total_output_queue_size); stcb->asoc.total_output_queue_size = 0; } - SCTP_TCB_SEND_UNLOCK(stcb); } int