From nobody Sat Apr 02 21:02:58 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 783A11A50ADF; Sat, 2 Apr 2022 21:02:58 +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 4KW8dG2xhdz3HKm; Sat, 2 Apr 2022 21:02:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648933378; 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=5Bg7wJa6i6RpzWEPgV3S4sVeS1PeLauDvGQGByf3rnA=; b=b7gcpvWR0Incv7J9lysT87b/zkaESMU6b7SUGCgPPajVKJpiYUd9o1Ej4Wy27v34SC5ITh s2EjMJ7wqfUWQpfjHdBHTqDP8jtalrEmavPsdKYTkV9lr+YIdsvQjQUzlNk+vXAyTuBMlt ARPAmn2nOY0WeW07ZoqeFHbyUBvlG9xykkg0CxEJOmM6lWyfrZ9t0O7mVGOKeWcG39ypZw Xx9gfH2lt0LXLrX62ig/Ak5fyy4I3DD+t0NI88lMzmT0XSpUAL/tXDfC4yT4IVV6s1kQhA LKfi/d0xCFYlxrofWht/VhBW1ZBj6+np4zyojOxVcriBGzZXDMH3Q+0l8dz97A== 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 45D6A10A09; Sat, 2 Apr 2022 21:02:58 +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 232L2w8l012796; Sat, 2 Apr 2022 21:02:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 232L2wQE012795; Sat, 2 Apr 2022 21:02:58 GMT (envelope-from git) Date: Sat, 2 Apr 2022 21:02:58 GMT Message-Id: <202204022102.232L2wQE012795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: b30b7a140c52 - main - sctp: cleanup, no functional change 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/main X-Git-Reftype: branch X-Git-Commit: b30b7a140c527c023f97083c256715ea86d4b6f4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648933378; 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=5Bg7wJa6i6RpzWEPgV3S4sVeS1PeLauDvGQGByf3rnA=; b=bG1f22MXnJYi+AG7tCEQ/K6+D1rMCQvzte+Hb7rin916zcPgvbLTuUgemirocyOqz/XEce ID7EvJaaNUaWFoKALPYkfHm3LTwLYf3vg9FGmMAF+wRrZNdGit/S3eHIm8boZm+PodoQzr Y0i4Fh4JlB2VaHzLx+m8gDEkVyR4IIc1i6XefAfVE8DBaCxIoVlBjCZeP5Qz9NejZwztQC Cc9RZcnITb2NWU1kp20rFuLoIIaMwc93anc4LodXLwlUh4Ny/exZYKqleLkxp1umatk/tf TL65T943PT9GwWnBo1gQgKVWuXHoeDieNauFK09YO94JCdx0/oke/vnYEowr/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648933378; a=rsa-sha256; cv=none; b=exCvw9RTafef7Ftk5uOH1bUT5qdPvpB30VvvE6hd9AhNdug0715K8BIuEzKdjF5Lp0eL/l 3GAp/VNG0uWhlsP6QNskGnKx9Ussa1/ZTkoKJUdFILuNqnR+H4nJR2Tkj2fzytBC76h1gD VOjgWbcSboDllpUsMkoYsPU2sfBFeXrem4G7lTi75KmFWQpRzcqOc/1yPfYkhjfuex/Goz 83ftpOb0FbcetzaEB0JnYmS6NRFC7kUS4/RhNAMQGpOdNsTL740KJzHlqqJCE13yu5tpNd lEMQxpErHGUFLyEQ+PmJ0EqiqYqL2V20Y+1P1wh54/YKYSrjcdKpqtuRC04+Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b30b7a140c527c023f97083c256715ea86d4b6f4 commit b30b7a140c527c023f97083c256715ea86d4b6f4 Author: Michael Tuexen AuthorDate: 2022-04-02 21:02:16 +0000 Commit: Michael Tuexen CommitDate: 2022-04-02 21:02:16 +0000 sctp: cleanup, no functional change MFC after: 3 days --- sys/netinet/sctp_output.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 4ef771b0cc1a..d1386eb767aa 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -13360,21 +13360,7 @@ skip_preblock: error = be.error; } } - if (error != 0) { - SOCKBUF_UNLOCK(&so->so_snd); - SCTP_TCB_LOCK(stcb); - hold_tcblock = true; - stcb->block_entry = NULL; - if (((asoc->state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) && - ((asoc->state & SCTP_STATE_WAS_ABORTED) == 0) && - (sp != NULL)) { - sp->processing = 0; - } - goto out_unlocked; - } - } - SOCKBUF_UNLOCK(&so->so_snd); - if (!hold_tcblock) { + SOCKBUF_UNLOCK(&so->so_snd); SCTP_TCB_LOCK(stcb); hold_tcblock = true; stcb->block_entry = NULL; @@ -13390,8 +13376,16 @@ skip_preblock: } else { error = ENOTCONN; } - goto out; + goto out_unlocked; + } + if (error != 0) { + if (sp != NULL) { + sp->processing = 0; + } + goto out_unlocked; } + } else { + SOCKBUF_UNLOCK(&so->so_snd); } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) { sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,