Because we're holding an exclusive write lock on the head, references to
the new inp cannot leak out even though it has been placed on the head list.
This commit is contained in:
parent
f96d2575ed
commit
c78cdaf83b
@ -141,12 +141,9 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td)
|
||||
so->so_linger = TCP_LINGERTIME;
|
||||
|
||||
inp = sotoinpcb(so);
|
||||
INP_LOCK(inp);
|
||||
tp = intotcpcb(inp);
|
||||
out:
|
||||
TCPDEBUG2(PRU_ATTACH);
|
||||
if (tp)
|
||||
INP_UNLOCK(inp);
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
splx(s);
|
||||
return error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user