mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146865
|
@ -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…
Reference in a new issue