When setting up timewait state for a TCP connection, don't hold the
socket lock over a crhold() of so_cred: so_cred is constant after socket creation, so doesn't require locking to read.
This commit is contained in:
parent
61d8eede29
commit
434a0d24dd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169347
@ -1811,8 +1811,8 @@ tcp_twstart(struct tcpcb *tp)
|
|||||||
tcp_discardcb(tp);
|
tcp_discardcb(tp);
|
||||||
so = inp->inp_socket;
|
so = inp->inp_socket;
|
||||||
soisdisconnected(so);
|
soisdisconnected(so);
|
||||||
SOCK_LOCK(so);
|
|
||||||
tw->tw_cred = crhold(so->so_cred);
|
tw->tw_cred = crhold(so->so_cred);
|
||||||
|
SOCK_LOCK(so);
|
||||||
tw->tw_so_options = so->so_options;
|
tw->tw_so_options = so->so_options;
|
||||||
SOCK_UNLOCK(so);
|
SOCK_UNLOCK(so);
|
||||||
if (acknow)
|
if (acknow)
|
||||||
|
@ -1811,8 +1811,8 @@ tcp_twstart(struct tcpcb *tp)
|
|||||||
tcp_discardcb(tp);
|
tcp_discardcb(tp);
|
||||||
so = inp->inp_socket;
|
so = inp->inp_socket;
|
||||||
soisdisconnected(so);
|
soisdisconnected(so);
|
||||||
SOCK_LOCK(so);
|
|
||||||
tw->tw_cred = crhold(so->so_cred);
|
tw->tw_cred = crhold(so->so_cred);
|
||||||
|
SOCK_LOCK(so);
|
||||||
tw->tw_so_options = so->so_options;
|
tw->tw_so_options = so->so_options;
|
||||||
SOCK_UNLOCK(so);
|
SOCK_UNLOCK(so);
|
||||||
if (acknow)
|
if (acknow)
|
||||||
|
Loading…
Reference in New Issue
Block a user