aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-03-20 16:17:54 +0000
committerMark Johnston <markj@FreeBSD.org>2020-03-20 16:17:54 +0000
commit569a186d026f7bd6c962ec0b09d00b3ce92fa4ed (patch)
treecd68a7bcfc551b113e0e12ed356de9818a8c72cb
parent37096740726c2608ad980e68d9afc4725b82fd8b (diff)
downloadsrc-569a186d026f7bd6c962ec0b09d00b3ce92fa4ed.tar.gz
src-569a186d026f7bd6c962ec0b09d00b3ce92fa4ed.zip
Remove UNP_NASCENT, reverting r303855.
unp_connectat() no longer holds the link lock across calls to sonewconn(), so the recursion described in r303855 can no longer occur. No functional change intended. Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=359170
-rw-r--r--sys/kern/uipc_usrreq.c7
-rw-r--r--sys/sys/unpcb.h1
2 files changed, 0 insertions, 8 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index e1be0f281ba3..2b8b04d08152 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -526,8 +526,6 @@ uipc_attach(struct socket *so, int proto, struct thread *td)
unp->unp_socket = so;
so->so_pcb = unp;
unp->unp_refcount = 1;
- if (so->so_listen != NULL)
- unp->unp_flags |= UNP_NASCENT;
if ((locked = UNP_LINK_WOWNED()) == false)
UNP_LINK_WLOCK();
@@ -800,9 +798,6 @@ uipc_detach(struct socket *so)
UNP_PCB_UNLOCK(unp);
goto restart;
}
- if ((unp->unp_flags & UNP_NASCENT) != 0) {
- goto teardown;
- }
if ((vp = unp->unp_vnode) != NULL) {
VOP_UNP_DETACH(vp);
unp->unp_vnode = NULL;
@@ -844,7 +839,6 @@ uipc_detach(struct socket *so)
freeunp = unp_pcb_rele(unp);
MPASS(freeunp == 0);
local_unp_rights = unp_rights;
-teardown:
unp->unp_socket->so_pcb = NULL;
saved_unp_addr = unp->unp_addr;
unp->unp_addr = NULL;
@@ -1685,7 +1679,6 @@ unp_connect2(struct socket *so, struct socket *so2, int req)
if (so2->so_type != so->so_type)
return (EPROTOTYPE);
- unp2->unp_flags &= ~UNP_NASCENT;
unp->unp_conn = unp2;
unp_pcb_hold(unp2);
unp_pcb_hold(unp);
diff --git a/sys/sys/unpcb.h b/sys/sys/unpcb.h
index 515355e80374..217cd7016505 100644
--- a/sys/sys/unpcb.h
+++ b/sys/sys/unpcb.h
@@ -110,7 +110,6 @@ struct unpcb {
*/
#define UNP_CONNECTING 0x010 /* Currently connecting. */
#define UNP_BINDING 0x020 /* Currently binding. */
-#define UNP_NASCENT 0x040 /* Newborn child socket. */
/*
* Flags in unp_gcflag.