From nobody Tue Nov 08 18:24:55 2022 X-Original-To: dev-commits-src-main@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 4N6GjN05yFz4V7Y3; Tue, 8 Nov 2022 18:24:56 +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 4N6GjM6kgbz4KnF; Tue, 8 Nov 2022 18:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667931895; 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=rvJjsCs3duB67Q6BA1u/Wn4eE5nDiC7iA9LAI5Ds0ek=; b=qJKNOLKZxypEfEUNRuqr9pX3IZCfc6Y/1ZOY9M0mGOm6vpGz11F0rAOnXs6Yqzua86bSPJ O4eS+snyG3XeF41/Zx4zscdT6Cs1Ocmhh0/PJsivRkmvFZwl8k6GoGGAIqw5RNZgEPlLHn C54RHwyBEE6wLPvyD05qDSJ2BH6+mXAKdRCXtCGa5xLuI9dGVQ1h3ZdxbARWvDFnJ672EX lm2+URocZoHEkwdngIMal6nFcnGtBci2suN38xtVEsV63znhKecUGR9PEVTqqHe1R814Xa /8yexu5IHa+l8W+6yHhuNXOXxz0VccAIIKa/s6Vsh4kPXXxlWLPgLh6FcDIGfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667931895; 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=rvJjsCs3duB67Q6BA1u/Wn4eE5nDiC7iA9LAI5Ds0ek=; b=I1G7MfZCiBn98jiNZ3j/vWE//d4JRuKfXJsIyPxM6nPfTQXNIb4V6EbeycoTEn36XumUeH EKRQ71Bx56IVWOwAWGRupyP/jVNfOE5m1wVony+vwzLCzKl0Nw3U9tUT9A9gTvbR3m/7Pe bOZFXrdM2Rj7WjmXjjkQvPQsHCOy35MYpcnbyOKdLOAWz4YNs8r+4d1UgBL2ZitYSaHYg+ WwVAPy7cmZZwaBhPtGCMdjOw9wC2hqaZvKn69XAgsvOCVuatFeqNeN9bDIRB4M85JBj+Ka ORJhwLXn94+lZj0RcMPO9FoxfI53szUJVyE3H+o0CNxIk1ens9loVxGTCV7KKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667931895; a=rsa-sha256; cv=none; b=A1OwhwXsMJDPPqfTDLXV327g1QRiyT4OfyruKcEt4Y0uTDlrOIBtfZ5dWFyQBUYhkBHSuk pfxOsorcVqQMR5ZeOO+qz5Rstl6+DBC7d5wcWPdh9VFHacyW/TiQD8PMyZcgkQiICRtc+I QzDa1u4jgtfh/3RBe9qcwU0fy5ihagD9aGbekqXuD5spIBSWTcApQdl+gvOl86ixSpqsyZ pNlMXbHSNdoJGxmDCh5KUa71EAAHOufZZsSgg/4pRRJcMLB1E6izJ/ayPyCH6QNmwnvoWt jFyWmJpyOslsgRv8I2FSpm3vZZioKmSBMk+T8wOGbJvTRnfXHrJ66oLqDZWLGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4N6GjM5WlMzrx5; Tue, 8 Nov 2022 18:24:55 +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 2A8IOt33043385; Tue, 8 Nov 2022 18:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A8IOtBt043384; Tue, 8 Nov 2022 18:24:55 GMT (envelope-from git) Date: Tue, 8 Nov 2022 18:24:55 GMT Message-Id: <202211081824.2A8IOtBt043384@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: ada90cb978e1 - main - tcp: remove INP_DROPPED check from notify functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: ada90cb978e14fdb539fb7c3557f1e9e4f9acdcb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ada90cb978e14fdb539fb7c3557f1e9e4f9acdcb commit ada90cb978e14fdb539fb7c3557f1e9e4f9acdcb Author: Gleb Smirnoff AuthorDate: 2022-11-08 18:24:39 +0000 Commit: Gleb Smirnoff CommitDate: 2022-11-08 18:24:39 +0000 tcp: remove INP_DROPPED check from notify functions These functions tcp_notify(), tcp_drop_syn_sent() and tcp_mtudisc() are called from tcp*_ctlinput*() right after successfull in_pcblookup*(). They shall never get a pcb that is dropped. --- sys/netinet/tcp_subr.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 2363cdf75e1e..999f52c9a339 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2596,9 +2596,6 @@ tcp_notify(struct inpcb *inp, int error) INP_WLOCK_ASSERT(inp); - if (inp->inp_flags & INP_DROPPED) - return (inp); - tp = intotcpcb(inp); KASSERT(tp != NULL, ("tcp_notify: tp == NULL")); @@ -3319,9 +3316,6 @@ tcp_drop_syn_sent(struct inpcb *inp, int errno) NET_EPOCH_ASSERT(); INP_WLOCK_ASSERT(inp); - if (inp->inp_flags & INP_DROPPED) - return (inp); - tp = intotcpcb(inp); if (tp->t_state != TCPS_SYN_SENT) return (inp); @@ -3356,8 +3350,6 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer) struct socket *so; INP_WLOCK_ASSERT(inp); - if (inp->inp_flags & INP_DROPPED) - return (inp); tp = intotcpcb(inp); KASSERT(tp != NULL, ("tcp_mtudisc: tp == NULL"));