From aa96e34a9c91b1e904da6b6948a04d46adb8f15d Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 20 Feb 2005 04:18:22 +0000 Subject: Move assignment of UNIX domain socket pcb during unp_attach() outside of the global UNIX domain socket mutex: no protection is needed that early in the setup of the UNIX domain socket and socket structures. MFC after: 3 days --- sys/kern/uipc_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 1007fe6..1963ac4 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -706,13 +706,13 @@ unp_attach(so) bzero(unp, sizeof *unp); LIST_INIT(&unp->unp_refs); unp->unp_socket = so; + so->so_pcb = unp; UNP_LOCK(); unp->unp_gencnt = ++unp_gencnt; unp_count++; LIST_INSERT_HEAD(so->so_type == SOCK_DGRAM ? &unp_dhead : &unp_shead, unp, unp_link); - so->so_pcb = unp; UNP_UNLOCK(); return (0); -- cgit v1.1