From nobody Wed May 17 17:26:03 2023 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 4QM0Pl5vqNz4BNrj; Wed, 17 May 2023 17:26:03 +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 4QM0Pl3Xbtz4591; Wed, 17 May 2023 17:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684344363; 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=keRtLowC4yCpwsZqiRlw41eaE8Mo/38BAUX5NeJUJBs=; b=nKvS72IRrmP+Mgu1RY1q+5nJfEIrGx//Ewhnye6KYehPSWOf0kx/XoCkC88VcNkw713nFH WUKrij1R/RzRycp8NYBEKXo2FqJWsYfIqrwZOXTDd/jS12EL7jxU0+oMxhDXuVp+arwKiN nAgjqj9dSXNLq8e0LwggFP9H8XruRdhV2CIR/nxPwbwIOwT0EikKUNMopjr74KZdDt67K5 paxyynBqhE2gfz57TDaity1zsCwViso4YGeNkGJK2DuvQVrYcFvmb1Xp22EwEmN5xuJh0P yIk69ASLRv52F22dGpSq7P8PepWnwuiRudJ6TAeFZVDMFJUssvrytpA2TyZtvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684344363; 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=keRtLowC4yCpwsZqiRlw41eaE8Mo/38BAUX5NeJUJBs=; b=aRT4TtI/mgQA1jAfyMgQd4fGzKZTQ5itUpY66sVvfgvvbqr3BvfH97oro78g21a/3z9Nra XltgSD1v0osGzJg28cZv1zqyqHESZ2/P127GLp5Fw3B2Jbbf1FQxgv12Bplo+E2tO0p4IU bOelcMHfUkYOcqgUUnIw5UJa9GnkmyKGg7jjycJAvrZpJ/LdoUatmdBGd/iUjDyZJml36O JywdTGfS8rMvAWKNa2dqnd53OiZp39PARCpVgdevx+hI6PCw1mEJSigaN4RqrRqzomyDHY 7mRCsjJ/iWg9A5cFn2ggkiJkZjwQ4zN3wiTW2UZL3Sxzed54O2cd4IQXzSTj/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684344363; a=rsa-sha256; cv=none; b=jMVH043hOdiaRSEQKnDVvc48oldyVzgq5zQsCqK13YBAQpS4J8oRhu1hux923Hxh8DrgqD 2IJIF00g2Pmn5GkkUX7/xA2KnOyccMUQ6RCjJ0NiV+416VZ9KJOX/mx/YNoM3eJVbzywdx 4uSeokNTaXk2nazBpcp97eNfdVDLYAYlZSpZxKhs2vYJrhk5XYN4OZSKk8FgG4G42qFJBw nL0PfEGYqsKrADZvmefBqR8L0aMgcBHV/pGb1vVPA72WPbVbs26Wgo+Uixs1Y8KecrA3UK dw++zjDPSTxZ+1xKsf30GJpn0T74WKc1UErli4QR7+pkPRoaUFfpKYF87ZyH8g== 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 4QM0Pl2c0Gz1CHv; Wed, 17 May 2023 17:26:03 +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 34HHQ3VW081103; Wed, 17 May 2023 17:26:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34HHQ3vp081101; Wed, 17 May 2023 17:26:03 GMT (envelope-from git) Date: Wed, 17 May 2023 17:26:03 GMT Message-Id: <202305171726.34HHQ3vp081101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 743516d51fa7 - main - ktls: don't try to unlock pcb if tcp_drop() already did 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/main X-Git-Reftype: branch X-Git-Commit: 743516d51fa7c7f35b2156b1985f100ddb64abc2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=743516d51fa7c7f35b2156b1985f100ddb64abc2 commit 743516d51fa7c7f35b2156b1985f100ddb64abc2 Author: Gleb Smirnoff AuthorDate: 2023-05-17 17:25:28 +0000 Commit: Gleb Smirnoff CommitDate: 2023-05-17 17:25:28 +0000 ktls: don't try to unlock pcb if tcp_drop() already did Reviewed by: rrs, gallatin --- sys/kern/uipc_ktls.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 1e892dde9022..df4fe4b77c04 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1715,10 +1715,12 @@ ktls_reset_send_tag(void *context, int pending) CURVNET_SET(inp->inp_vnet); tp = tcp_drop(tp, ECONNABORTED); CURVNET_RESTORE(); - if (tp != NULL) + if (tp != NULL) { counter_u64_add(ktls_ifnet_reset_dropped, 1); - } - INP_WUNLOCK(inp); + INP_WUNLOCK(inp); + } + } else + INP_WUNLOCK(inp); NET_EPOCH_EXIT(et); counter_u64_add(ktls_ifnet_reset_failed, 1);