Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2026 15:13:49 -0700
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>, np@freebsd.org
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 4fadf2466468 - main - tcp_close: Use in6_pcbdisconnect for INET6 sockets
Message-ID:  <ad68HZF99vXubx5J@cell.glebi.us>
In-Reply-To: <69de895e.398d0.7253ff8b@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Tue, Apr 14, 2026 at 06:37:18PM +0000, John Baldwin wrote:
J> The branch main has been updated by jhb:
J> 
J> URL: https://cgit.FreeBSD.org/src/commit/?id=4fadf2466468dd6dcb6cf9e3739ed696a18c1bb4
J> 
J> commit 4fadf2466468dd6dcb6cf9e3739ed696a18c1bb4
J> Author:     John Baldwin <jhb@FreeBSD.org>
J> AuthorDate: 2026-04-14 18:07:51 +0000
J> Commit:     John Baldwin <jhb@FreeBSD.org>
J> CommitDate: 2026-04-14 18:07:51 +0000
J> 
J>     tcp_close: Use in6_pcbdisconnect for INET6 sockets
J>     
J>     This also fixes the LINT-NOINET builds.
J>     
J>     Fixes:          40dbb06fa73c ("inpcb: retire INP_DROPPED and in_pcbdrop()")

I think this change is also required.

Almost sure it will fix panic observed by Navdeep.

-- 
Gleb Smirnoff

[-- Attachment #2 --]
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index ad596cf761d2..3750c7040fbc 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -531,6 +531,9 @@ in6_pcbdisconnect(struct inpcb *inp)
 	KASSERT(inp->inp_smr == SMR_SEQ_INVALID,
 	    ("%s: inp %p was already disconnected", __func__, inp));
 
+	if (inp->inp_flags & INP_UNCONNECTED)
+		return;
+
 	INP_HASH_WLOCK(inp->inp_pcbinfo);
 	in_pcbremhash(inp);
 	inp->inp_flags |= INP_UNCONNECTED;
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ad68HZF99vXubx5J>