Assert tcbinfo lock, inpcb lock in tcp_disconnect().
Assert tcbinfo lock, inpcb lock in in tcp_usrclosed(). MFC after: 7 days
This commit is contained in:
parent
e3d5315d01
commit
e6e0b5ffd1
@ -1236,7 +1236,11 @@ static struct tcpcb *
|
||||
tcp_disconnect(tp)
|
||||
register struct tcpcb *tp;
|
||||
{
|
||||
struct socket *so = tp->t_inpcb->inp_socket;
|
||||
struct inpcb *inp = tp->t_inpcb;
|
||||
struct socket *so = inp->inp_socket;
|
||||
|
||||
INP_INFO_WLOCK_ASSERT(&tcbinfo);
|
||||
INP_LOCK_ASSERT(inp);
|
||||
|
||||
if (tp->t_state < TCPS_ESTABLISHED)
|
||||
tp = tcp_close(tp);
|
||||
@ -1267,6 +1271,9 @@ tcp_usrclosed(tp)
|
||||
register struct tcpcb *tp;
|
||||
{
|
||||
|
||||
INP_INFO_WLOCK_ASSERT(&tcbinfo);
|
||||
INP_LOCK_ASSERT(tp->t_inpcb);
|
||||
|
||||
switch (tp->t_state) {
|
||||
|
||||
case TCPS_CLOSED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user