summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 9777602..ccdc807 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -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:
OpenPOWER on IntegriCloud