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:
Robert Watson 2007-05-07 13:04:25 +00:00
parent 61d8eede29
commit 434a0d24dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169347
2 changed files with 2 additions and 2 deletions

View File

@ -1811,8 +1811,8 @@ tcp_twstart(struct tcpcb *tp)
tcp_discardcb(tp);
so = inp->inp_socket;
soisdisconnected(so);
SOCK_LOCK(so);
tw->tw_cred = crhold(so->so_cred);
SOCK_LOCK(so);
tw->tw_so_options = so->so_options;
SOCK_UNLOCK(so);
if (acknow)

View File

@ -1811,8 +1811,8 @@ tcp_twstart(struct tcpcb *tp)
tcp_discardcb(tp);
so = inp->inp_socket;
soisdisconnected(so);
SOCK_LOCK(so);
tw->tw_cred = crhold(so->so_cred);
SOCK_LOCK(so);
tw->tw_so_options = so->so_options;
SOCK_UNLOCK(so);
if (acknow)