mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
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
This commit is contained in:
parent
6ff81db1a7
commit
7301cf23ef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142118
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user