diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-02-20 04:18:22 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-02-20 04:18:22 +0000 |
commit | aa96e34a9c91b1e904da6b6948a04d46adb8f15d (patch) | |
tree | 89168309167f1e9f0af87374d1ec87f74bb47244 /sys/kern/uipc_usrreq.c | |
parent | f8cfb0a8b62b8e27686139d577abe3ef84dbc7c4 (diff) | |
download | FreeBSD-src-aa96e34a9c91b1e904da6b6948a04d46adb8f15d.zip FreeBSD-src-aa96e34a9c91b1e904da6b6948a04d46adb8f15d.tar.gz |
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
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |